What's the best and most secure way to include/require files?
I'm currently using the following method:
For my include files, I have the following at the top:
PHP Code:
defined('_VALID_INCLUDE') or die('Direct access not allowed.');
And for the files where I include that file, I have:
PHP Code:
define('_VALID_INCLUDE', TRUE);
require('connect.php');
Is this a good and secure method, or is there a better way to do this?