PHP: How to return information to a waiting script and continue processing

后端 未结 7 2054
暖寄归人
暖寄归人 2021-02-09 22:14

Suppose there are two scripts Requester.php and Provider.php, and Requester requires processing from Provider and makes an http request to it (Provider.php?data=\"data\"). In th

7条回答
  •  粉色の甜心
    2021-02-09 22:43

    I use this code for running a process in the background (works on Linux).

    The process runs with its output redirected to a file.

    That way, if I need to display status on the process, it's just a matter of writing a small amount of code to read and display the contents of the output file.

    I like this approach because it means you can completely close the browser and easily come back later to check on the status.

提交回复
热议问题