![]() |
including global.php from different directory?
Okay so I can include global.php from / where it exists like so.
/functions.php PHP Code:
/custompages/foobar/functions.php However it seems to hate it when I include it as PHP Code:
Warning: require(./includes/class_bootstrap.php) [function.require]: failed to open stream: No such file or directory in /home/base/public_html/global.php on line 15 Fatal error: require() [function.require]: Failed opening required './includes/class_bootstrap.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/base/public_html/global.php on line 15 assuming that it is trying to look for these files from /custompages/foobar/instead of /. How can I fix this, I want to include global so I dont need to set up the mysql db connections. |
Anyone can help with the above query?
I'm attempting to create a product and am planning to have all the files in packages/<product> rather than spread throughout the folders. However it seems to be difficult to include 'global.php' in the files ! |
I think it will work if you chdir() to the directory with global in it. You can chdir() back after it's included. Like (using the example above):
PHP Code:
|
All times are GMT. The time now is 08:29 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|