Shell_exec php with nohup

参考

https://stackoverflow.com/questions/4929827/shell-exec-php-with-nohup

红色部分为关键点。

nohup /usr/bin/php /mytask/task1.php >/mytask/nohup/task1.log 2>&1 &

原文地址:https://www.cnblogs.com/coffee_cn/p/12101364.html