HTML文件作为奇怪的字符大杂烩返回

I have the following code in my application:

header('Content-Type: text/html; charset=utf-8');

header('Content-Length: ' . filesize($filename));
header('Content-Disposition: inline; filename=' . $filename);
header('Content-Transfer-Encoding: binary');
ob_clean();
@readfile($filename);

It is supposed to read an html file and writes in the response output.

The strange thing that happens now, is, that this works very well on one server, while on the other one it returns something that resembles an encoding error, like

���&�lyY�]�����8���O��:���x��בw�6_an ����������+�G��͟>m��O�H&�WK�u>��_��(�U��z�_}�e�����ON�o��Y<�#�}��/�˵��}���Q��/ҼI?�Z1+�E��wZ�N묶��S�v�n_�o�B�9��e0��,�}=K[P�����������ڋ�����w���.

This is definitely not due to an encoding issue of the respective file, because it happens as well when I replace

@readfile($filename);

with

echo "ABCDE";

Both are Linux Servers and the Apache and PHP Versions are pretty similar:

PHP 5.6.35 / Apache/2.4.33 for the correct version,

PHP 5.6.36 / Apache/2.4.18 for the incorrect one.

I found the solution, but I don't clearly understand why. Instead of ob_clean() it must be ob_end_clean();