Log in

View Full Version : Question about template based pages


KingPuyol
01-23-2007, 02:34 PM
I've asked this question in vb.com and here's the thread:
http://www.vbulletin.com/forum/showthread.php?t=217356

My question is, can I create these php files out of the forum directory? they only work when they are in the forum directory and didn't when they are somewhere outside, I changed the path to the global.php file and still nothing happened?

I really need help.

humid
01-23-2007, 02:44 PM
If you create the php files out of the forum directory, you'll need to change the links on the php file to the direct link.

E.g global.php -> /forum/global.php

KingPuyol
01-24-2007, 05:29 AM
If you create the php files out of the forum directory, you'll need to change the links on the php file to the direct link.

E.g global.php -> /forum/global.php

I did that before and didn't work.

webmazter
01-24-2007, 05:49 AM
you need to put chdir() function before include() / require() forum/global.php


chdir(PATH_TO_YOUR_FORUM);
require_once('./global.php');

Dismounted
01-24-2007, 05:57 AM
And chdir back to the current PHP file's folder or you will have problems :).

KingPuyol
01-24-2007, 11:20 AM
I took the CHDIR from the vBa CMPS portal file and I just added it there. Thanks guys. :)

webmazter
01-25-2007, 01:28 AM
Glad can help :)