PHP flushing output as soon as you call echo

前端 未结 6 752
有刺的猬
有刺的猬 2020-12-22 08:47

I thought flush(); would work, at least from what Google/Stackoverflow tell me, but on my Windows WAMP (Windows, Apache, MySQL, PHP) system it doesn\'t work.

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-22 09:17

    If you're using CGI/FastCGI, forget it! These don't implement flush. The Webserver might have it's own buffer.

    You can disable all output buffering in PHP with following command:

    ob_implicit_flush();
    

提交回复
热议问题