I am doing a lot of processing at my PHP page and I want to display progress information to the user, for instance, finished 10% 20% and so. What is happening now is that all the data is displayed at once after processing is done, how can I display it right away!
I tried to set comment out output buffer in php.ini and I tried to use flush() after echo statements, not working, any suggestions?
Here is my code:
ob_start();
while ($line = read_file_line("c:/1.txt")) {
$read_lines_count++;
if($read_lines_count % 100 == 0) {
echo "parsed $read_lines_count <br />";
ob_flush();
}
}