Re: differences in between these env. variables

From: Date: Fri, 27 Jan 2012 17:18:00 +0000
Subject: Re: differences in between these env. variables
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-316414@lists.php.net to get a copy of this message
On Fri, Jan 27, 2012 at 6:09 PM, Tedd Sperling <tedd.sperling@gmail.com> 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

« previous php.general (#316414) next »