Bug #13606 Updated: $PHP_SELF not always point to script name
ID: 13606
Updated by: alindeman@php.net
Reported By: flaviovs@magnux.com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Linux+Apache 1.3.20+PHP (DSO)
PHP Version: 4.0.6
New Comment:
Fixed in docs, will appear in a day or two...
Previous Comments:
------------------------------------------------------------------------
[2001-12-14 13:49:08] yohgaki@php.net
Type = Documentation Problem.
When test.php is a script, $PHP_SELF === /test.php/some_string
http://example.com/test.php/some_string
Document should descript this behavior..
------------------------------------------------------------------------
[2001-10-08 23:55:32] flaviovs@magnux.com
The docs says that $PHP_SELF contains "The filename of the currently
executing script, relative to the document root." However, if one uses
additional PATH_INFO data in the URL, they get inserted on $PHP_SELF as
well.
Example script: <?= $PHP_SELF ?>
http://example.org/example.php
prints "/example.php"
http://example.org/example.php/foobar.html
prints "/example.php/foobar.html"
If this is not a bug in PHP then the docs may need to be updated.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=13606&edit=1
Thread (3 messages)