PHP Curl async response

前端 未结 2 1714
终归单人心
终归单人心 2021-02-11 01:18

I have a PHP file that invokes another PHP file via curl. I am trying to have the second file send a response back to the first to let it know that it started. The problem is th

2条回答
  •  梦谈多话
    2021-02-11 01:32

    The answer ended up being that CURL does not behave like a browser:

    PHP Curl output buffer not receiving response

    I ended up running my 2nd file first and my 1st file second. The 2nd file waited for a 'finished' file write that the 1st file did once it, obviously, finished.

    At this point, it seems like the database would be a better place to store messages for files to be able to pass between each other, but a file would also work for a quick and dirty job.

提交回复
热议问题