On my WAMP setup, I'm using $_server['document_root']
in a number of filepaths..
I had been using a static $ROOT
variable, but thought it would be nice not to have to edit that constant when uploading the site.
Unfortunately, on my WAMP setup, $_server['document_root']
is being defined as 'C:/wamp/www/'
and none of the links seem to be working under WAMP on Windows (though they were fine on MAMP on Mac when I initially made the change). It's looking in file:///C:/wamp/www
.
I had read an article that was espousing the virtues of document_root for security reasons and ease of use. Is it really recommended, though? It occurs to me that it could be something different depending on the installation.
I'm thinking of just defining the document_root variable, but now I'm wondering whether it's reliable to use the variable at all.