PHP connection_aborted() not working correctly

前端 未结 5 1466
北荒
北荒 2021-01-14 07:47

I have the following code:

ignore_user_abort(true);
while(!connection_aborted()) {
    // do stuff
}

and according to the PHP documentation

5条回答
  •  长情又很酷
    2021-01-14 07:57

    misfortune enough, I have output_buffering=Off and anyway, my while loop continues running and connection_aborted() gives 0 even though the client closed the browser. Any other tips?

提交回复
热议问题