I have a page on a remote server with the following line:
$contents = file_get_contents($search_url);
which automatically echoes $contents to the HTML page no matter what I do. It’s as if I have done the following:
$contents = file_get_contents($search_url);
echo $contents;
What could be causing PHP to do this? Is there any configuration item that needs changing?
It was a STUPID bug – the variable $contents is being used in the included file as well as in the function it is included from. This caused the issue – nothing wrong with file_get_contents!