Can a PHP script continue running after ending the HTTP request?

后端 未结 2 710
借酒劲吻你
借酒劲吻你 2021-01-02 11:12

How do I write a PHP script that continues running, even after flushing out some text and ending the HTTP request? Is this possible?

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-02 11:30

    To run PHP app forever or until php terminates

    ignore_user_abort(true);
    
    set_time_limit(0);
    

提交回复
热议问题