When using the PHP include, how can I find out which file is calling the include? In short, what is the parent\'s file filename?
include
In the parent file, add this line before including the child file:
$_SESSION['parent_file'] = $_SERVER['PHP_SELF'];
And then in the child file, read the session variable:
$parent_file = $_SESSION['parent_file']