Will apache kill a PHP process if the user closes the connection

后端 未结 1 1999
野趣味
野趣味 2021-01-25 02:58

I have the following argument with a colleague of mine. I stated that Apache won\'t kill a PHP process if the user closes the connection (closes the window or tab for example).

相关标签:
1条回答
  • 2021-01-25 03:12

    First up: you are right ;-)

    What happens is, that your browser chooses to ignore the answer and move on. It does not send the apache some sort of 'I quit you can stop'.

    The process will run until it is finished. So if you code an endless loop, closing the browser window will not save you. The script max execution time eventually will, but that is another topic.

    0 讨论(0)
提交回复
热议问题