Is there a way to have PHP print the data to a web browser in real time?

后端 未结 8 436
误落风尘
误落风尘 2020-12-17 21:00

For example, if I have an echo statement, there\'s no guarantee that the browser might display it right away, might display a few dozen echo statements at once, and might wa

8条回答
  •  萌比男神i
    2020-12-17 21:34

    flush() is part of the answer. At least until a year ago, using flush was unreliable in Safari, however. Depending on your scenario, I'd look into solutions involving javascript. Maybe the various implementation of progress bars have code/ideas you can recycle.

提交回复
热议问题