====== Which PHP page included me? ====== $fileList = get_included_files(); $topMost = $fileList[0]; if ($topMost == __FILE__) echo 'no parents'; else echo "parent is $topMost"; $caller_tmp=explode("/",__FILE__);$caller=end($caller_tmp);
$fileList = get_included_files(); $topMost = $fileList[0]; if ($topMost == __FILE__) echo 'no parents'; else echo "parent is $topMost";
$caller_tmp=explode("/",__FILE__);$caller=end($caller_tmp);