How do I denied user access script directly in URL
<p>I have a jQuery script using <code>.live()</code> to load it's page content.</p>

<pre><code>$('#content').load("content.php?" + id);
</code></pre>

<p>Question: How can I deny a user from accessing the file <code>content.php</code> directly via a URL?</p>

<p>I tried to put this code on top of <code>content.php</code> but Access Denied appear in my <code>#content</code> div</p>

<pre><code>if (!empty($_SERVER['SCRIPT_FILENAME']) &amp;&amp; 'content.php' == basename($_SERVER['SCRIPT_FILENAME']))
    die('Access Denied');
</code></pre>

<p>What is the correct way to make sure users can't access my <code>content.php</code> file using a URL?</p>
