I want to make sure people can\'t type the name of a PHP script in the URL and run it. What\'s the best way of doing this?
I could set a variable in the file that wi
This is an old question, but I found this one-liner quite effective:
$inc = get_included_files(); if(basename(__FILE__) == basename($inc[0])) exit();
get_included_files() returns an array with the files included on the script. The first position is the root file, and the other positions are the included files.