I know that sounds confusing, but how do you find the name of the file that another file is included into.
For example, I have two files a.php and b.php. b.php is included into a.php like so:
a.php:
include('b.php');
Now I want code to put into b.php to find the name of a.php. Does that make any sense?
EDIT: Ok, I have come up with a better way to rephrase the question:
How do you get the name of the including file (so in the above example, find the name of file a.php using code in b.php). Does this work?
basename($_SERVER['SCRIPT_FILENAME']);