I put this at the top of any files I include(). Smart? Dumb? Easier way?
Code:
<?php if (basename($_SERVER['SCRIPT_FILENAME']) == basename(__FILE__)) exit(); ?>