PHP loop; how to print each result and delay it for a second before echoing another result?

前端 未结 2 854
独厮守ぢ
独厮守ぢ 2020-12-04 02:57

this is my first question here on stackoverflow, I just curious.. is it possible to delay loop in PHP ? I\'m trying to print each result to browser and pause the script usin

2条回答
  •  伪装坚强ぢ
    2020-12-04 03:45

    Servers usually buffer the output of a server side script until there's enough in it to output try something like this. Combination of setting output buffering off and manually flushing the buffer. Note the implcit flush line and the flush and ob_flush lines.

    
    

提交回复
热议问题