I'm trying to execute a samle PHP program.
But whenever I open a page it gives me errors/warnings
like this:
this "line 2" looks like this:PHP Code:Warning: Undefined variable: DOCUMENT_ROOT in C:\InetPub\wwwroot\chat\chat\config\config.lib.php on line 2
Fatal error: Failed opening required '/design/db.php' (include_path='') in C:\InetPub\wwwroot\chat\chat\config\config.lib.php on line 2
If I write in a .php page this linePHP Code:require($DOCUMENT_ROOT."/design/db.php");
then everything works fine.PHP Code:$DOCUMENT_ROOT = "C:\InetPub\wwwroot";
I was told that $DOCUMENT_ROOT works only in xNUX,
and that I should write the above line in every page.
Is it true ?





Bookmarks