Can PHP scripts continue to run even if the user closed the browser?

后端 未结 7 1508
日久生厌
日久生厌 2020-12-09 15:46

For example, there is a very simple PHP script which updates some tables on database, but this process takes a long time (maybe 10 minutes). Therefore, I want this script to

相关标签:
7条回答
  • 2020-12-09 16:35

    Yes. The server doesn't know if the user closed the browser. At least it doesn't notice that immediately.

    No: the server probably (depending of how it is configured) won't allow for a php script to run for 10 minutes. On a cheap shared hosting I wouldn't rely on a script running for longer than a reasonable response time.

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