php.net |  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 ?>

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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-14 13:49 UTC] 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..

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

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Dec 03 00:01:23 2020 UTC