|
[php]
ob_implicit_flush() ;
system("ping baidu.com -c 20");
[/php]
结果总是system调用完成后才输出所有结果,我需要ping每次输出一行信息,则立即发送到客户端.
这个怎么弄?Post by function.system.php
The system() call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module. >>>>>>>>>>>>>>>>>>>>>>>>>>
<pre>
system("ping baidu.com -c 20");
</pre>可以按上述要求输出.
使用重定向后,则不行,ping baidu.com -c 20|sed ... |
|