Jump to content

[SOLVED] Flush Data


The Little Guy

Recommended Posts

This is the only code I have found so far that flushes data...

 

<?php
ob_implicit_flush();  
str_pad(' ',1024);
echo "Hello World <br />";
ob_flush();flush();
$i=0;
while ($i <= 3000) {
echo $i.str_pad(' ',1024);
ob_flush();flush();
usleep(010000); // equals 0.01 seconds
$i++;
}
?>

 

for some reason though, If I replace this:

echo $i.str_pad(' ',1024);

 

with this:

echo $i.' ';

 

The flush no longer works. Anyone know how to properly flush data?

Link to comment
https://forums.phpfreaks.com/topic/168641-solved-flush-data/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.