|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #13606 $PHP_SELF not always point to script name
Submitted: 2001-10-08 23:55 UTC Modified: 2002-02-06 12:23 UTC
From: flaviovs at magnux dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.6 OS: Linux+Apache 1.3.20+PHP (DSO)
Private report: No CVE-ID: None
 [2001-10-08 23:55 UTC] flaviovs at magnux dot 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 ?>
	prints "/example.php"
	prints "/example.php/foobar.html"

If this is not a bug in PHP then the docs may need to be updated.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-14 13:49 UTC]
Type = Documentation Problem.

When test.php is a script, $PHP_SELF === /test.php/some_string

Document should descript this behavior..

 [2002-02-06 12:23 UTC]
Fixed in docs, will appear in a day or two...

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 19 11:03:35 2021 UTC