I have a jQuery script using `.live()` to load it's page content.

```
$('#content').load("content.php?" + id);

```

Question: How can I deny a user from accessing the file `content.php` directly via a URL?

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

```
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'content.php' == basename($_SERVER['SCRIPT_FILENAME']))
    die('Access Denied');

```

What is the correct way to make sure users can't access my `content.php` file using a URL?