Does browser stop/crash halts script execution?

后端 未结 4 2028
长情又很酷
长情又很酷 2021-01-18 07:43

I mean, if a php script/page is invoked by a browser and page load/execution is interrupted by user or by browser crash, does script execution continues on the server side?<

4条回答
  •  走了就别回头了
    2021-01-18 08:07

    You can test this very easily:

    echo "sleeping 10 seconds...";
    sleep(10); //close your browser at this point
    error_log("i'm still here!");
    

    Just check your web server error log for the output.

提交回复
热议问题