【发布时间】:2013-05-30 12:16:20
【问题描述】:
我在我的 php 脚本中使用shell_exec() 运行一个 linux 命令。
$output = shell_exec('/usr/bin/linux-command ');
After 执行命令我将值放入变量中。没关系。
但是,这里我的 linux 命令将给出输出 continuously in terminal。
会是这样的。。
$linux-command
123 456 789
789 456 123
123 456 789 .. //and so on..(by pressing 'Ctrl+c' only we can stop this.
每 5 秒显示一行。如何每 5 秒检索一次线路。
我的页面正在加载中......因为它正在等待$output。
有什么办法可以解决我的问题吗??
任何想法都值得赞赏。提前谢谢你
【问题讨论】:
标签: php linux shell-exec