Is there any elegant way to check if a file was included by using include/include_once/require/require_once or if the pag
include
include_once
require
require_once
$target_file = '/home/path/folder/file.php'; // or use __FILE__ if ($x=function($e){return str_replace(array('\\'), '/', $e);}) if(in_array( $x($target_file), array_map( $x , get_included_files() ) ) ) { exit("Hello, already included !"); }