<?php
// Execute a shell script
$dump = shell_exec('bigfile.sh'); // This script takes some 10s to complete execution
print_r($dump); // Dump log to screen
?>
当上述脚本从浏览器执行时,它会加载10秒,并将脚本输出转储到屏幕上。这当然是正常的。但是,如果我要显示在实时在屏幕上通过shell脚本写入stdout数据,有一些方法我能做到这一点?shell_exec()in PHP
您可以加入一个代码示例为其中一方,伊沃?可能是我的代码上面的替代品? – 2010-04-10 01:09:50