How to get partial output when script is executing?

前端 未结 3 690
长情又很酷
长情又很酷 2020-12-10 17:31

Description:

I have a script which do multiple actions in longer time. In standard situation output from PHP script is sent after full execution of this script. Use

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-10 18:15

    Call flush(); just after your code outputs "Element X finished. Y time."

    By default PHP will store all output in the output buffer until it's ready to send to the browser. flush() and ob_flush() force output to be sent.

提交回复
热议问题