PDA

View Full Version : Scripts outside the main dir


stoute
03-10-2013, 05:05 AM
Hey I'm trying to add a script outside the main directory for the vb.

http://main_forums.com/dir

I found a post about the opposite direction

in the template it states:
// chdir ('./');
require_once('./global.php');

when I uncomment the chdir it still doesn't work.

the php file that I am trying to get to show up is in the /dir where the main vb is in the URL root.

kh99
03-10-2013, 02:09 PM
the php file that I am trying to get to show up is in the /dir where the main vb is in the URL root.

If that's true, then I think you'd want this:
chdir ('..');
require_once('./global.php');



or else use the full absolute path to your forum directory (the os path, not the one you use in a url).

stoute
03-10-2013, 04:15 PM
Thanks I'll give that a shot and let you know if it was a success or not!

--------------- Added 1362939323 at 1362939323 ---------------

Thanks a bunch that solved that issue!