Last active
October 17, 2017 10:34
-
-
Save davidyell/60670c3f5ecc442c77fc8d6f1a340674 to your computer and use it in GitHub Desktop.
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 | |
header('Content-Type:text/text'); | |
// Disable the Nginx output buffering | |
header('X-Accel-Buffering: no'); | |
ob_implicit_flush(true); | |
ob_end_flush(); | |
ini_set('output_buffering', false); | |
for ($i = 1; $i <= 5; $i++) { | |
echo "$i\n"; | |
@ob_end_flush(); | |
@flush(); | |
sleep(2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment