php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #29746 Add a $_SERVER["CURRENT_SCRIPT_NAME"] variable.
Submitted: 2004-08-19 01:06 UTC Modified: 2004-08-19 10:05 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: gazman at email dot si Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: whatever
Private report: No CVE-ID: None
 [2004-08-19 01:06 UTC] gazman at email dot si
Description:
------------
Please add a $_SERVER["CURRENT_SCRIPT_NAME"] variable. It should contain the name of the current EXECUTING script.

It should be used to tell the code the filename it is in. It would be used in conjunction with include() and require() functions, as the $_SERVER["SCRIPT_NAME"] holds the value of the parent script and not the child script.

It should be fairly easy to do... PHP must know it to parse the file and i believe you could as well make that availible as a variable from code. (a read-only variable (constant?) that points to the name of the currently parsed file)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-19 01:19 UTC] gazman at email dot si
damn :D I searched that thing for HOURS! You can anyone inform the documentation team that they should put a link to THAT site from the site where the $_SERVER vars are? :D

You made my day!
 [2004-08-19 09:46 UTC] derick@php.net
Reopening as doc problem, as I think this should be documented there (even although it's not a variable)
 [2004-08-19 10:05 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

"The __FILE__ constant contains the full path and filename of the current (i.e. included) file."
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 18 15:01:27 2024 UTC