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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: flaviovs at magnux dot com
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 21:01:29 2024 UTC