简体   繁体   中英

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. 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. I dont see any other solution. But i maybe wrong.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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