Instead of using ob_flush
, just use ob_end_flush
at the beginning of your script to remove the output buffer.
Also, declare the character encoding of your page, so the browser can show your output right away without having to look at hundreds of input bytes first:
header('Content-Type: text/html; charset=utf-8');
If your script still does not work, the web server is Apache, and you can create a .htaccess
file, try doing so with the following contents:
php_flag zlib.output_compression Off
By the way, the ini_set
is useless, and you should also include html
, head
, and body
elements. At least for Firefox, including these elements also solves the problem:
echo '<!DOCTYPE html><html><head><title>test</title></head><body>';
// ...
echo '</body></html>';