I have an include that leads to another include. Like: PHP code: //file 1 include(../../file2.php); //file 2 include(../../folder/folder2/file3.php); //file 3 $filename = ??? file name of file 1? Code (markup): How would I get the file name of file 1 using PHP in file 3? Thanks! ~imozeb
<?php //file 1 include('../../file2.php'); //file 2 include('../../folder/folder2/file3.php'); //file 3 $inc = get_included_files(); $filename = basename($inc[1]); ?> PHP: