Re: function basename()
| From: | Marcus | Date: | Fri, 27 Jul 2001 09:02:18 +0000 |
| Subject: | Re: function basename() | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-61177@lists.php.net to get a copy of this message | ||
Yes $PHP_SELF exists but it contains just the actual script. And therefore i
missed
a function for extracting filenames from urls. I needed to extract the
scriptname from
the url to identify the navigation position....
marcus
"Stig S. Bakken" <Stig.Bakken@fast.no> wrote in message
news:3B608C84.2264F6DD@fast.no...
> Marcus wrote:
> >
> > shouldn't the function basename() return only the
> > script part and not the query part?
> >
> > Yes i know it would make a difference if a filesystem could have '?' in
> > filenames or if you wanted to handle those for search operations. But
> > perhaps ther could be another switch or just a function
> > filename/scriptname()
>
> You're probably looking for the $PHP_SELF variable. basename() is for
> file names, not HTTP paths.
>
> - Stig