php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #16459 way to get *actual* filename code is in (include() breaks available methods)
Submitted: 2002-04-05 19:07 UTC Modified: 2002-04-05 19:17 UTC
From: olli at ukgamer dot net Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.1.2 OS: Win*/Slackware
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: olli at ukgamer dot net
New email:
PHP Version: OS:

 

 [2002-04-05 19:07 UTC] olli at ukgamer dot net
There doesn't appear to be a way to get the filename of code that is currently executing. 

Eg. echo $SCRIPT_FILENAME; or echo $PHP_SELF; 
works fine in most situations, but as soon as the file containing this code is included in another, they start to return the filename of the includING file. (not the includED one).

I understand this generally goes against the purpose of include() but this functionality would be very useful. 

Thanks

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-05 19:17 UTC] olli at ukgamer dot net
Sorry, i missed the constant "__FILE__".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC