thanx works !

"Francois Jordaan" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > 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.
>
> I'm quite new to PHP, but I've had to do the same thing recently.
> Someone mentioned
> http://www.php.net/manual/en/language.variables.predefined.php
> ...but as far as I could tell none of them would give only "subapp" in
> your example.
>
> This may work for you:
>
> $page_url = $REQUEST_URI;
> $url_array = parse_url ($page_url);
> $directory = dirname ($url_array["path"]);
> print("Dir the user is browsing: $directory");
>
> Hope that helps,
>
> francois
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to