I am trying to figure out how to get the name of a file that I've included in my script.
Basically, for logging purposes (without having to hardcode the file name) I am trying this:
INCLUDED FILE load_xml.php:
echo $PHP_SELF;
Running File: index.php
include("load_xml.php");
I want the echo to show load_xml.php, not index.php.
Of course, I know PHP_SELF won't work, but as an example of what I'm trying to do. I've tried several $_SERVER[] but nothing so far.
Any thoughts?
Thanks!