What happens when the server is in an infinite loop and the client stops?

后端 未结 3 1155
眼角桃花
眼角桃花 2021-01-11 15:13

I am trying to figure out how the \"talking\" between the server and the client is done.

So, when the server is generating an infinite loop, echoing

3条回答
  •  囚心锁ツ
    2021-01-11 15:47

    If you do set_time_limit(0); in the script (so the PHP interpreter lets it run forever), then the script will probably run until the web server kills it after however long the TimeOut variable is set to (defaults to 300 seconds I think, and as far as I know is only an Apache setting).

    See Apache's docs for the TimeOut directive.

提交回复
热议问题