Hi. I'm a PHP newbie and I'm trying to use DOCUMENT_ROOT in a script but I couldn't get it work. Can you please tell me what's wrong? Here're the things I tried:
<?
echo $DOCUMENT_ROOT."<br>";
echo $_SERVER["DOCUMENT_ROOT"]."<br>";
echo $HTTP_SERVER_VARS["DOCUMENT_ROOT"]."<br>";
?>
Errors:
Notice: Undefined variable: DOCUMENT_ROOT in d:\wwwroot\p\tmp.php on line 2
Notice: Undefined index: DOCUMENT_ROOT in d:\wwwroot\p\tmp.php on line 3
Notice: Undefined index: DOCUMENT_ROOT in d:\wwwroot\p\tmp.php on line 4
I'm using PHP 4.3 on Windows XP Pro and there's a php.ini in Windows folder in case you need to know..