<?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