I have a php file `fopen.php` that retrieves data from another php file `d.php` with a GET request e.g. `d.php?p=4`

When I run this code I'm getting weird results. It works on my local server but not on the heartinternet one that this website is running on

`fopen.php?p=4`

```
echo $_GET['p']."<br/>";

if (!file_exists("d.php")) { 
    die('File does not exist');
}
else
{
    echo file_get_contents("d.php") or die("FAIL");
    echo "<br/>";
    echo file_get_contents(("d.php?p=".$_GET['p'])) or die("FAIL");
}

```

This page reads as follows:

```
4
1
FAIL

```

allow\_url\_fopen is On 

Any clues as to what might be happening?