Jump to content

ob_flush is not working.


scarhand

Recommended Posts

the page is not outputting anything while it loads.

 

heres my code:

 

<?php

set_time_limit(0);

if (ob_get_level() == 0)
  ob_start();

echo 'working...';

for ($i = 1; $i <= 800000; $i++) 
{
  echo "DONE $i<br />";
  
  flush();
  ob_flush();
  usleep(500000);
}

ob_end_flush();

?>

 

why isnt it working?

Link to comment
https://forums.phpfreaks.com/topic/144154-ob_flush-is-not-working/
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.