Results 1 to 2 of 2
May 11, 2009, 05:00 #1
$_SERVER['DOCUMENT_ROOT'] platform differences
I've noticed that whilst developing on a Windows XP machine with WAMP, $_SERVER['DOCUMENT_ROOT'] returns "/dir/path/". However, on my Unix servers it returns "/dir/path" (no trailing slash).
This becomes a problem as something like the following:
require($_SERVER['DOCUMENT_ROOT'] . "/header.php");
Works on the Unix server, but not in Windows...
Is this a commonly known difference and what's the best way to get around it?