Forum Moderators: coopster
_SERVER["REAL_ROOT"] = /
_SERVER["DOCUMENT_ROOT"] = /
_ENV["REAL_ROOT"] = /
_ENV["DOCUMENT_ROOT"] = /
Does that mean that / is the full server path to root?
I'm trying to be sure I'm using the right path to the called (included) file.
I have only gotten require() to work when the calling file is located in the root folder. If the calling file is in a folder in the root folder, like /test/callingFile.php, the require fails.
[The called (included) file, however, can be in a folder in the root folder.]
Surprisingly, this did not work for any calling file outside of the root folder:
require($_server['DOCUMENT_ROOT']."/calledFile.php");
Surprisingly, this did not work for any calling file outside of the root folder:
require($_server['DOCUMENT_ROOT']."/calledFile.php");
The file you are trying to require is //calledFile.php. Try this:
require($_SERVER['DOCUMENT_ROOT']."calledFile.php");
eelix
I had reported this problem to Yahoo and am now seeing different results than when I first began this thread, so maybe they've fixed something.
I'll start a separate thread for the subdomain problem I'm having now.