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