R: [PHP-WIN] Re: $PHP_SELF
| From: | Darvin Andrioli | Date: | Mon, 07 Jan 2002 08:50:22 +0000 |
| Subject: | R: [PHP-WIN] Re: $PHP_SELF | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-11328@lists.php.net to get a copy of this message | ||
Try $_SERVER["PHP_SELF"]
Darvin
> -----Messaggio originale-----
> Da: David [mailto:php@warpedweb.net]
> Inviato: domenica 6 gennaio 2002 3.12
> A: php-windows@lists.php.net
> Oggetto: [PHP-WIN] Re: $PHP_SELF
>
>
> Steve Yates said something on 05 Jan 2002, in php.windows:
>
> > "David" <php@warpedweb.net> wrote:
> >> Gregory Hart said something on 05 Jan 2002, in php.windows:
> >> > I understand that the variable $PHP_SELF doesn't always work.
> >> > I'm using Windows 98 SE with PHP 4.1.1. Is there any way to get
> >
> > I think I have seen $PHP_SELF not work on PWS...is that what you
> > have? You might try $PATH_INFO or $SCRIPT_URL.
> >
> >> $SCRIPT_NAME usually works for me on most servers.
> >
> > I think this returns the program or CGI name. At least is does on
> > the versions of Apache that I've tried.
> >
>
> True, on Apache, PHP_SELF work, on others, (IIS, Xitami) it will not, but
> SCRIPT_NAME does.
>
> If you put a little bit of code at the beginning of your script like:
> if(isset($PHP_SELF)) $THIS_SCRIPT = $PHP_SELF;
> else $THIS_SCRIPT = $SCRIPT_NAME;
>
> Then there is $PATH_INFO, which is even less consistant.
>
> Regards,
> David
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>