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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
43 + 10 = ?
Subscribe to this entry?

 
 [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: Tue Apr 16 23:01:30 2024 UTC