Base Directory?!
For a while now I used something like the following to get a good include() path for my PHP code.
[ php Code ]
-
require_once(BASE_PATH."/config/cn.php");
However, I was hit with the realization that it won’t work with my new Apache setup, which goes something like the following:
[ conf Code ]
-
-
ServerRoot "X:/home/abdallah/xampplite/apache"
-
DocumentRoot "X:/home/abdallah/xampplite/htdocs"
-
<ifmodule>
-
Alias /mrp "X:varwwwmanufac"
-
</ifmodule>
-
<directory>
-
AllowOverride None
-
Options all
-
Order allow,deny
-
Allow from all
-
</directory>
So, $_SERVER['DOCUMENT_ROOT'] no longer works!
Instead I’ve reverted to something like the following:
Post a comment
You must be logged in to post a comment.