note 81216 added to reserved.variables
| From: | Typer85 at gmail dot com | Date: | Mon, 18 Feb 2008 23:56:47 +0000 |
| Subject: | note 81216 added to reserved.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136260@lists.php.net to get a copy of this message | ||
Note the manual entry for PHP_SELF states the following:
"The filename of the currently executing script, relative to the document root. For instance,
$_SERVER['PHP_SELF'] in a script at the address http://example.com/test.php/foo.bar would be
/test.php/foo.bar."
However I did some vigorous testing on three different machines and this note is not always true.
The results are given below:
Given a URL of http://www.example.com/Info.php/Page/Home
Apache 2.2.4/Win32/PHP 5.2.2/Apache 2.0 Handler
----> PHP_SELF = Info.php/Page/Home
Apache 1.3.37/Unix/PHP 5.2.2/CGI
----> PHP_SELF = Info.php
Apache 1.3.33/Unix/5.1.4/FastCGI
----> PHP_SELF = Info.php
To be completely honest, I am not sure why this is the case; perhaps there is a setting in Apache to
modify this option, but in either case take careful consideration of this note.
----
Server IP: 69.147.83.197
Probable Submitter: 217.54.225.113
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.php
Edit -- https://master.php.net/note/edit/81216
Del: integrated -- https://master.php.net/note/delete/81216/integrated
Del: useless -- https://master.php.net/note/delete/81216/useless
Del: bad code -- https://master.php.net/note/delete/81216/bad+code
Del: spam -- https://master.php.net/note/delete/81216/spam
Del: non-english -- https://master.php.net/note/delete/81216/non-english
Del: in docs -- https://master.php.net/note/delete/81216/in+docs
Del: other reasons-- https://master.php.net/note/delete/81216
Reject -- https://master.php.net/note/reject/81216
Search -- https://master.php.net/manage/user-notes.php