Created
June 18, 2015 19:13
-
-
Save incomestore/eef7fc0d2d279395efd1 to your computer and use it in GitHub Desktop.
Output buffering in PHP on nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_implicit_flush(1); | |
for ($i = 0; $i < 10; $i++;) | |
{ | |
@header("Content-Encoding: none"); | |
echo $i; | |
//this is for the buffer achieve the minimum size in order to flush data | |
echo str_repeat(' ', 1024 * 64); | |
sleep(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment