The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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 ! |
#3
|
|||
|
|||
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:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|