Setting a PHP script as a Windows Service

后端 未结 7 1234
春和景丽
春和景丽 2020-12-01 03:29

I need to set up a PHP script as a windows service.

I need it to run regardless of which user is logged in, and on system start up - so it sounds like a windows ser

7条回答
  •  执念已碎
    2020-12-01 03:37

    You can run php on command line by giving different parameters and also the script-file as parameter. If you add the whole line you need into the service configuration it should run. So you are also able to try the device before creating the service. If the php-script is outside your web-route perhaps you should add the folder to the PATH-Variable of windows.

提交回复
热议问题