php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #10148 Feature Request
Submitted: 2001-04-03 21:56 UTC Modified: 2001-04-03 22:46 UTC
From: chris at digitekdesign dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS: Linux
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: chris at digitekdesign dot com
New email:
PHP Version: OS:

 

 [2001-04-03 21:56 UTC] chris at digitekdesign dot com
It would be nice to be able to call a function to return the name and path of a PHP script that is currently running (for instance, say TEST.PHP calls /WEB/PHPSTUFF/LIB.PHP the function would return /WEB/PHPSTUFF/LIB.PHP)

If this is already possible, I haven't been able to find a way to do it.  I've searched the documentation and asked around on different forums.

Thanks!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-03 22:46 UTC] torben@php.net
It's not a function, but it is in the manual. I think you want the
__FILE__ constant.

http://www.php.net/manual/en/language.constants.php

__FILE__
  The name of the script file presently being parsed. If used within
  a file which has been included or required, then the name of the 
  included file is given, and not the name of the parent file. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 22:01:28 2024 UTC