Re: guess documentroot
| From: | Richard Lynch | Date: | Thu, 05 Oct 2006 18:52:38 +0000 |
| Subject: | Re: guess documentroot | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242702@lists.php.net to get a copy of this message | ||
On Thu, October 5, 2006 8:42 am, Javier Ruiz wrote:
> Is it possible to get the path of a file relative to the document root
> of
> the webserver using php?
> For example...
>
> if we have a script like
> http://localhost/mydir/myseconddir/index.php
>
> is there a way to get that it's runing on
> /mydir/myseconddir/
>
> ??
>
> something like getcwd() but webserver relative, not filesystem.
Anytime you got a question like this, about what data PHP has
available to you, the answer is:
<?php phpinfo();?>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?