title: php - website security using global variable
body: <p>i was recently browsing some php source code, particularly ones of forum software like phpbb and esotalk</p>
  
  <p>I noticed one thing, most of them used a global variable at the start of their page as some sort of security like so:</p>
  
  <pre><code>if (!defined("IN_ESOTALK")) exit; //For esotalk
  if (!defined("IN_PHPBB")) exit; //FOR phpbb
  </code></pre>
  
  <p>What sort of security is this? I don't understand. 
  Could you explain to me what this prevents and how?</p>
  
  <p>thanks,
  Vidhu</p>