Re: $PHP_SELF in include files
| From: | David Johansen | Date: | Tue, 12 Mar 2002 23:13:14 +0000 |
| Subject: | Re: $PHP_SELF in include files | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88259@lists.php.net to get a copy of this message | ||
I'm doing exactly what you said and here's what it says when I call
$PHP_SELF in the include file:
http://12.254.227.149/<br><b>Warning</b>:%20%20Undefined%20variable:%20%20PH
P_SELF%20in%20<b>c:/inetpub/wwwroot/pages.inc</b>%20on%20line%20<b>35</b><br
>?page=questions
"Lars Torben Wilson" <torben@php.net> wrote in message
news:1015974570.2134.94.camel@ali...
> On Tue, 2002-03-12 at 15:02, David Johansen wrote:
> > Is there a way that I can use $PHP_SELF in include files, so that the
> > function will use the URL of the php script that calls the include file?
> > Thanks,
> > Dave
>
> If a.php includes b.php, and you check $PHP_SELF in b.php, it should
> give you the path to a.php. What result are you getting?
>
>
> --
> Torben Wilson <torben@php.net>
> http://www.thebuttlesschaps.com
> http://www.hybrid17.com
> http://www.inflatableeye.com
> +1.604.709.0506
>