The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
PHP: includig global.php outside of forum
Okay, including the global.php file isn't all that hard, but what I've noticed is a problem is that ANYTHING put in a $string before I include the global.php is removed / dumped and ... NULL... this messes up my scripts. I need to figure out a way of keeping the value of a $string I set before the inclusion..
please help me with this. Okay, to detail the issue a little, here is my header.php file: $currentdir = $_SERVER['DOCUMENT_ROOT']; chdir("/home/sporthoj.com/www/www.sporthoj.com/forum"); require("./global.php"); if($currentdir) { chdir("$currentdir"); } else { chdir("/home/sporthoj.com/www/www.sporthoj.com"); } You might see what I am trying to do. I am including the global.php file from other directories and need to return back to the original directory. but it just don't work because the value of $currentdir is set to NULL after the global.php file has been loaded. How I know: Because if I echo $currentdir before requre() there is a value inside it. But when I echo AFTER require, the value of $currentdir is no longer present. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|