Starting phantomjs server from php and waiting for it's response

前端 未结 1 595
闹比i
闹比i 2020-12-09 06:27

I wanted to run a phantomjs server from my php script, then do a curl request to it and read it\'s response (which in the final version will give a path to generated pdf). W

相关标签:
1条回答
  • 2020-12-09 06:47

    You have several issues:

    1. phantomjs is started in the foreground, which means your php script stops/sleeps until phantomjs stops. Either start the phantomjs service, or run it in the background. See " php execute a background process " for an HowTo.
    2. The web server may probably not access the "graphical part" of your operating system, which means it cannot interact with your desktop. This is why the icon does not appear, but phantomjs should still start.
    0 讨论(0)
提交回复
热议问题