Re: How to get the URL into a var?
| From: | Jason Wong | Date: | Wed, 30 Jan 2002 09:41:31 +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-82696@lists.php.net to get a copy of this message | ||
On Saturday 02 March 2002 17:29, Andy 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??
Have a look at $HTTP_SERVER_VARS["SCRIPT_FILENAME"] &
$HTTP_SERVER_VARS["PATH_TRANSLATED"]
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
Thus mathematics may be defined as the subject in which we never know
what we are talking about, nor whether what we are saying is true.
-- Bertrand Russell
*/