I haven't done PHP for a while so I apologize in advance if it's something simple.
I'm migrating a PHP-based site to a shared web hosting and there's an issue with the way it outputs HTML markup. Let's consider the following code snippet that reads HTML from a file on the server and outputs it to the web browser:
$handle = @fopen($file_name, "rb");
$str = @fread($handle, filesize($file_name));
fclose($handle);
print $str;
For some reason it replaces some characters on the page. Like it puts that character instead of an apostrophe:
while it looked normal when the exact same code ran from a previous web hosting server:
Any idea what am I missing here?