Forum Moderators: coopster

Message Too Old, No Replies

Absolute Path to Server Root

         

ukgimp

2:17 pm on Apr 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know I can get this with phpinfo(); but I would like to be able to call a script that references the absolute path. I cant seem to find this option anywhere.

Scratches head..

you know like:

<%= Server.MapPath("\") in ASP

jetboy_70

2:24 pm on Apr 1, 2004 (gmt 0)

10+ Year Member



Absolute path to what?

Absolute path to your site root is:

$_SERVER['DOCUMENT_ROOT']

Absolute path to the current script is:

$_SERVER['SCRIPT_FILENAME']

Either of these what you're after?

ukgimp

2:30 pm on Apr 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The DOCUMENT_ROOT is the one I was after. Must have missd it for looking.

[uk2.php.net...]

Cheers

seomike2003

5:52 pm on Apr 1, 2004 (gmt 0)



you can call it as a predefined variable
$DOCUMENT_ROOT