简体   繁体   English

如何在exec(),system()php中实时显示输出到数组

[英]how to display output in real time to an array in exec(), system() php

how to display output in real time to in array?... 如何在数组中实时显示输出?

The code below shows only the array when the batch file is completed.. 批处理文件完成时,下面的代码仅显示数组。

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

output arrays when the batch file is completed..how to display output in real time to in array 批处理文件完成后输出数组..如何在数组中实时显示输出

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

anyone help me..thanks 任何人都可以帮助我..谢谢

Because that working PHP. 因为那可以用PHP。 Here is no possible to create multi threading application. 这里无法创建多线程应用程序。 To doing what you want, you have to change exec bat script to PHP script doing this same what doing bat script WITH showing output. 要执行所需的操作,您必须将exec bat脚本更改为PHP脚本,以执行与显示输出的bat脚本相同的操作。 I dont see any other solution. 我没有看到其他解决方案。 But i maybe wrong. 但是我也许错了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM