这取决于。
When a PHP script is running normally
the NORMAL state, is active. If the
remote client disconnects the ABORTED
state flag is turned on. A remote
client disconnect is usually caused by
the user hitting his STOP button.
You can decide whether or not you want
a client disconnect to cause your
script to be aborted. Sometimes it is
handy to always have your scripts run
to completion even if there is no
remote browser receiving the output.
The default behaviour is however for
your script to be aborted when the
remote client disconnects. This
behaviour can be set via the
ignore_user_abort php.ini directive as
well as through the corresponding
php_value ignore_user_abort Apache
httpd.conf directive or with the
ignore_user_abort() function.
这似乎说,你的问题的答案是“是的,脚本将终止,如果用户离开页面”。
复杂的事情即使你发出了定期调用flush(),output buffering打开会导致这些调用陷阱,不会将它们发送到客户端,直到脚本完成!
更复杂的事情是,如果您安装了缓冲响应(例如mod_gzip)的Apache处理程序,然后再次php将不会检测到连接已关闭,脚本将继续卡车。
。。