Can't include using $_SERVER['DOCUMENT_ROOT']
Posted: Sun Oct 16, 2005 10:36 am
Jcart | Please use
If i use this code in the main page it doesnt work:
It produces this error:
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I have a dir in the root dir called "Includes".
But for some reason i can't access it unless i hard code it (I have full admin rights). The last thing i want to do is hard coding something.
If i use this code in the main page it works:Code: Select all
include("Includes/Config.inc");Code: Select all
include($_SERVER['DOCUMENT_ROOT']."/Includes/Config.inc");Why?failed to open stream: No such file or directory
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]