I have a php file which I will be using as exclusively as an include. Therefore I would like to throw an error instead of executing it when it\'s accessed directly by typing
if (basename($_SERVER['PHP_SELF']) == basename(__FILE__)) { die('Access denied'); };