Quote:
Originally Posted by Opserty
You need to include global.php from your forum directory...
Change:
PHP Code:
require_once('./global.php');
To:
PHP Code:
$cwd = getcwd();
chdir('path/to/your/forums');
require_once('global.php');
chdir($cwd);
|
I have tried his the way I understand it, but maybe I am getting this wrong so I will throw in more info. I have been able to get the test pages to work and several live pages that live in the forum folder. But now I really need to put a php page in another folder.
Here is my folderstructure.
/rootfolder/forum
I want a php file to work in
/rootfolder/anotherfolder
So here is the code I am trying to use in my php file in /rootfolder/anotherfolder
PHP Code:
$cwd = getcwd();
chdir('/rootfolder/forum');
require_once('global.php');
chdir($cwd);
Can anyone spot a typo or syntax error.
Thanks if you can help.
BTW, I have dropped a straight HTML file in /rootfolder/anotherfolder and that works fine. The php files gives me a white screen and when I view the source all I see are the default html structure tags.