$SERVER variables are just that - $SERVER['name_of_parameter']. But what I meant by a constant is that in the file which is including other files, define a constant at the top of the file, like INCLUDE. Then on every page which is included (and shouldn't be directly accessible), check to make sure the INCLUDE constant is defined. If it is, then the page was included, and you can let the page be shown. Otherwise, it was directly accessed, and you could die() with an error message to the user.
Page which includes others:
define("__INCLUDE", true);
Page to be included (restrictedContent.php):
if (!defined("__INCLUDED"))
die("Direct access to this script is not allowed.");