PHP: exec() doesn't run in the background even with “>/dev/null 2>&1 &”

前端 未结 7 1023
迷失自我
迷失自我 2021-01-04 10:59

I\'m calling this in my php script:

    exec(\"gutschein.php >/dev/null 2>&1 &\");

Calling the script (generates a pdf and s

7条回答
  •  旧时难觅i
    2021-01-04 11:49

    You can use screen: screen -d -m /usr/bin/php gutschein.php

    Here is screen's manual if you need more info on options.

提交回复
热议问题