PDA

View Full Version : Requiring Global from within 2 directories?


DrkFusion
09-16-2002, 11:29 PM
Hi, I was wondering how I would require the global in the forum root from a 2 folders within there
Ex: /forums/folder1/folder2 I have a php code there that needs to include global.php.

I tried
require("../../global.php");
But it doesn't work.

Anyways, thanks in advance

Regards
Arunan

futureal
09-17-2002, 03:21 AM
You will probably want to use an absolute path rather than a relative one.

From a shell or FTP, go to the directory that global.php is in and type pwd. It will give you something like:

/home/www/forumdir

So then you would use:

require("/home/www/forumdir/global.php");

That should work as far as I know.

DrkFusion
09-17-2002, 07:03 PM
thanks, I used a chdir :)
Thanks
Arunan