Msg#: 4604088 posted 11:08 am on Aug 22, 2013 (gmt 0)
How do I add a trailing slash to my htdocs folder (C:\xampp\htdocs)?
On my live production site I can include files like:
which works fine, but on localhost the server looks for:
I've edited the local httpd.conf file (added the trailing slash to DocumentRoot "C:/xampp/htdocs/" and <Directory "C:/xampp/htdocs/">) and tried some rewrite rules (even if I could get my head round regex, would this work anyway?) in htaccess without success.
This only affects files referenced using DOCUMENT_ROOT.
[edited by: phranque at 10:06 pm (utc) on Aug 27, 2013] [edit reason] disabled graphic smileys [/edit]
Msg#: 4604088 posted 5:27 am on Aug 25, 2013 (gmt 0)
That's interesting -- I've given up on "local servers" and only use production servers, but I have include($_SERVER["DOCUMENT_ROOT"].'/foo/foo.php'); on all of them, which I believe is how it should be [or at least it's been that way on every production box I can remember] and makes sense technically according to the docs.
DOCUMENT_ROOT should be:
The document root directory under which the current script is executing, as defined in the server's configuration file.