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
You don't have right permission to access this file directly."); } ?>
place the code above in the top of your included php file.
ex:
You don't have right permission to access this file directly."); } // do something ?>