从终端持久PHP脚本记录输出

时间:2014-06-16 05:52:08

标签: php terminal

This question显示了如何运行持久性PHP脚本。但是,有没有办法将输出写入文本文件?我尝试过nohup php hello_world.php & > &1 > output.txt,但我得syntax error near unexpected token '&'。如果我删除&,则会记录输出,但脚本只运行一次。谢谢。

1 个答案:

答案 0 :(得分:0)

试试这个:

nohup php hello_world.php > output.txt &
相关问题