Forum Moderators: coopster

Message Too Old, No Replies

Document Root question

I'm thinking it's an easy one

         

mattyb515

5:59 pm on Jun 25, 2007 (gmt 0)

10+ Year Member



I've found a little program that will compile php scripts so that they can be from as an executable. The issue I'm running into is setting the document root. I'm not sure what the statement would be. I'm guessing something like:

$DOCUMENT_ROOT = 'd:\#*$!xx';

Everything I've ever done was run on a server and Linux based so I'm not sure about this. Any help is greatly appreciated. Thanks all.

mattclayb

8:33 pm on Jun 25, 2007 (gmt 0)

10+ Year Member



you can use $_SERVER['DOCUMENT_ROOT'] which will give the root of the current script under which it is running.

If you want to see the output so you can better understand, simply make a script and write
<?PHP
echo $_SERVER['DOCUMENT_ROOT'];
?>