Phpcomet push set_time_limit (0); ob_start (); $ pad & nbsp ;=& nbsp; str_repeat ('& nbsp;', 4000); echo & nbsp; $ pad, '& lt; br & nbsp;/& gt;'; ob_flush (); flush (); & nbsp; & nbs php comet push
Set_time_limit (0 );
Ob_start ();
$ Pad = str_repeat ('', 4000 );
Echo $ pad ,'
';
Ob_flush ();
Flush (); // send the generated content to the browser immediately instead of sending the content together after the script ends.
$ I = 1;
While ($ I ++ ){
Echo $ pad ,'
';
Echo $ I ,'
';
Ob_flush ();
Flush (); // send the generated content to the browser immediately instead of sending the content together after the script ends.
Sleep (1 );
}
This code is copied online. the code is okay. why cannot it be implemented in my wamp? Do you need to configure apahce or php. ini php comet to share with: '; ob_flush ();... 'data-pics = ''>
------ Solution --------------------
Edit php. ini and set output_buffering = 0 to disable the output cache.