PHP: check if file has been included/required
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6823424/how-to-tell-if-a-file-has-already-been-required">How to tell if a file has already been required?</a>  </p>
</blockquote>



<p>Short of defining a constant or variable before including a file, like so:</p>

<pre><code>define('ENV', 1);
include 'file.php';
</code></pre>

<p>Contents of <code>file.php</code>:</p>

<pre><code>if (!defined('ENV')) { die('*sneaky sneaky*'); }
</code></pre>

<p>Is there a way to check within <code>file.php</code> if it's been included/required without having to check for a constant or variable?</p>
