【问题标题】:how to display output in real time to an array in exec(), system() php如何在exec(),system()php中实时显示输出到数组
【发布时间】:2013-11-29 08:05:59
【问题描述】:

如何将输出实时显示到数组中?...

下面的代码只显示批处理文件完成时的数组..

$output = array();
echo exec("E:\SmartbookGen\engine.bat", $output);
print_r($output);

批处理文件完成时输出数组..如何将输出实时显示到数组中

C:\xampp\htdocs\MIS>E:
E:\>cd SmartbookGen 
E:\SmartbookGen>java -Xms256M -Xmx512M -cp lib/*; SmartbookGen 
year_active-2013
month_active-6
numberOfPages : 7
numberOfPages : 19
numberOfPages : 24
numberOfPages : 23
numberOfPages : 215
numberOfPages : 172
numberOfPages : 14
Exporting...

谁能帮帮我..谢谢

【问题讨论】:

  • 您最终找到解决方案了吗?

标签: php batch-file exec


【解决方案1】:

因为 PHP 可以正常工作。这里不可能创建多线程应用程序。要执行您想要的操作,您必须将 exec bat 脚本更改为 PHP 脚本,执行与显示输出的 bat 脚本相同的操作。我没有看到任何其他解决方案。但我可能错了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-13
    • 1970-01-01
    相关资源
    最近更新 更多