可能重複:
close a connection early
How to continue process after responding to ajax request in PHP?PHP下降HTTP連接
我需要在阿賈克斯行動,以點連接:
$response = getResponse($params);
echo $response; // don't make user to wait
flushAndDropConnection();
someLongActionsFor5Seconds();
我該怎麼辦呢?
可能重複[如何在PHP中響應ajax請求後繼續進程?](http://stackoverflow.com/questions/1481247/how-to-continue-process-after-responding-to- ajax-request-in-php)或http://stackoverflow.com/questions/4806637/continue-processing-after-closing-connection或http://stackoverflow.com/questions/138374/close-a-connection-early或 – ManseUK 2012-07-30 13:52:44
您應該閱讀PHP文檔中關於'flush()'的討論。這篇文章具體:http://www.php.net/manual/en/function.flush.php#91556 – Tchoupi 2012-07-30 13:54:24
重複的解決方案不起作用。 – DmitryR 2012-07-30 14:08:22