Forum Moderators: phranque
define( "INCLUDED", 1 );
At the top of each include file you can put the following lines:
if (!defined("INCLUDED")) {
// no access, terminate script
echo 'Forbidden, this file should be included and cannot be accessed directly.';
exit;
}
That way, people can never run your include files seperatly.
The latter half of this thread addresses the question,
How would one best go about storing scripts off the document root? [webmasterworld.com]
(starting at the second question in msg #7) may help.