Re: php_self
| From: | Ken Chew | Date: | Mon, 23 Oct 2000 04:53:27 +0000 |
| Subject: | Re: php_self | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21715@lists.php.net to get a copy of this message | ||
> > This doesn't work though if it is the files is /bar/foo.php
>
> This doesn't make any difference. If you use basename($PHP_SELF) as a
link,
> the link url will still be pointing to /bar/foo.php because it's relative.
I'm looking at this code fragment,
self_url = $PHP_SELF.
((isset($QUERY_STRING) && ("" != $QUERY_STRING)) ?
"?".$QUERY_STRING : "")
In this case if you can't make any assumption on where the code is, I can't
think of how basename() would help.
> > On a more general note, is there any problem with this other then
> > the url is
> > changed and your path to php.exe is revealed.
>
> It's a nightmare if you've got other relative links in the pages.
Precisely.