Suppose I have some operations (e.g database INSERT queries) that need to be done in the PHP script, but I want to finish displaying the page to the user first before executing them.
One approach I've heard here is u开发者_Python百科sing HTTPResponse::send()
following the display. What approach is best/fastest here?
Note/Update: I'm done displaying everything by the time I'm starting doing these INSERT queries. This is a static page.
Use ob_implicit_flush(true);
. It will send any data echo'd, immediately to the user's browser.
精彩评论