Try $_SERVER["PHP_SELF"]

Darvin

> -----Messaggio originale-----
> Da: David [mailto:[EMAIL PROTECTED]]
> Inviato: domenica 6 gennaio 2002 3.12
> A: [EMAIL PROTECTED]
> Oggetto: [PHP-WIN] Re: $PHP_SELF
>
>
> Steve Yates said something on 05 Jan 2002, in php.windows:
>
> > "David" <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Windows 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