Thread: Including.. :S
View Single Post
Old 04-04-2008, 08:16 AM   #6 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Quote:
Originally Posted by johnN View Post
To stop this issue cropping up at all, use $_SERVER['DOCUMENT_ROOT']. This will automatically go to your root dir:)

you'd just put include($_SERVER['DOCUMENT_ROOT']."/website/includes/config.php");

works in any directory
Oo didn't know that.. I thought that I could use like

include('/website/includes/config.php');


Still, I didn't want to use this, since I might change the name of the folder of the website, so I needed a path FROM the current folder
__________________
Tanax is offline  
Reply With Quote