开发者

PHP exec: hangs, doesn't continue to next line

I have a php file 'run.php' which I'm running from the terminal. Within this file I have the following lines:

exec("open-crawlers $port 2>&1",$out,$code); echo 'hello';

The problem that I'm having is that the terminal hangs after executing the 'exec开发者_开发问答' command; the program doesn't reach the second line.


Try this:

exec("nohup open-crawlers $port >> /tmp/log_file.log 2>&1 &");
echo 'hello';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜