Can a PHP script start another PHP script and exit?

前端 未结 6 1897
长发绾君心
长发绾君心 2021-02-04 17:02

How can a PHP script start another PHP script, and then exit, leaving the other script running?

Also, is there any way for the 2nd script to inform the PHP script when i

6条回答
  •  野性不改
    2021-02-04 17:39

    You can create a request and close the connection right after it is done being written to.

    Checkout the code in http://drupal.org/project/httprl as can do this (non-blocking request). I plan on pushing this lib to github once I get it more polished; something that can be ran outside of drupal. This should do what your looking for.

提交回复
热议问题