PHP apenas arquivo incluído
$inc = get_included_files(); if(basename(__FILE__) == basename($inc[0])) exit();
Fragile Flamingo
$inc = get_included_files(); if(basename(__FILE__) == basename($inc[0])) exit();