I mea开发者_开发知识库n, 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?
yes, unless you call ignore_user_abort() first. http://php.net/manual/en/function.ignore-user-abort.php
Depends on ignore_user_abort() setting
Depends on ignore_user_abort()
. But if you have some loop or poorly written code, it will run until script timeout / max execution time has been reached (~30 seconds).
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.
精彩评论