Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


development:php:who_included_me

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);

Discussion

Enter your comment:
A᠎ V​ D S H
 
development/php/who_included_me.txt · Last modified: 2019/10/31 09:05 (external edit)