Re: How to get the URL into a var?
| From: | Moriyoshi Koizumi | Date: | Fri, 01 Mar 2002 15:49:22 +0000 |
| Subject: | Re: How to get the URL into a var? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86779@lists.php.net to get a copy of this message | ||
Hi,
have you tried this one?
$dir = dirname( $HTTP_SERVER_VARS['PHP_SELF'] );
Moriyoshi Koizumi
"Andy" <news.letters@gmx.de> wrote:
> Hi there,
>
> I am trying to find out which dir the user is browsing. How can I get the
> URL into a var? I tryed path_info, but it only returns the filename.
>
> Here is an example:
>
> URL: http://www.server.com/subapp/test.php
>
> Should return :
>
> subapp
>
> Is this possible??
>
> Thanx for any help
>
> Cheers Andy