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 ( ! defined('BASEPATH')) exit('No direct script access allowed');
will do the job smooth