RE: [PHP] document_root
| From: | John W. Holmes | Date: | Tue, 01 Oct 2002 22:21:09 +0000 |
| Subject: | RE: [PHP] document_root | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118455@lists.php.net to get a copy of this message | ||
You want DOCUMENT_ROOT. If you have a file
/home/groups/myproject/htdocs/file.php
then, from within that file.php, DOCUMENT_ROOT is
/home/groups/myproject/htdocs/
I think it would be $_SERVER['DOCUMENT_ROOT'] in newer versions of PHP.
---John Holmes...
> -----Original Message-----
> From: Tony Crockford [mailto:tonyc@boldfish.co.uk]
> Sent: Tuesday, October 01, 2002 6:01 PM
> To: Php-General@Lists. Php. Net
> Subject: [PHP] document_root
>
> Hi
>
> what exactly does document_root do?
>
> Does it give to path to the file from the server root?
>
> or does it give the path to the server root?
>
> has something changed in 4.2.2
>
> If I want the path to the document I'm in how do I get it?
>
> looked everywhere (manual, books and archive), but the answer is
> probably so simple I'm not looking in the right place.
>
> help and abuse gratefully received.
>
> Thanks
>
> Tony
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php