Re: differences in between these env. variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 27, 2012 at 6:09 PM, Tedd Sperling <tedd.sperling@xxxxxxxxx> wrote:
> On Jan 11, 2012, at 9:24 PM, tamouse mailing lists wrote:
>
>> Is there ever a case where SCRIPT_NAME does not equal PHP_SELF?
>
> Was this every answered? I would like to know.
>
> Cheers,
>
> tedd

I don't think it was answered, but I'll answer now. Yes, there is a difference.

At [1] you'll find a script that prints both SCRIPT_NAME and PHP_SELF.
For most of the time, the output will be the same. But now, try the
url at [2], and you'll see that it returns /dev/test/envvars.php for
SCRIPT_NAME, and /dev/test/envvars.php/a/b/c for PHP_SELF.

I hope this clears things up a bit.

- Matijn


[1] http://tijnema.myftp.org/dev/test/envvars.php
[2] http://tijnema.myftp.org/dev/test/envvars.php/a/b/c

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux