For example, it takes three minutes for exec to execute A script, and php returns the result and output content of A script three minutes later. Within three minutes of exec execution, each output line can obtain the output in real time. Is there any better way to do this? For example, it takes three minutes for exec to execute A script, php returns the result and output content of script A three minutes later. In the three minutes that I need to execute exec, each output line can get the output in real time. Is there any better way to do this?
Reply content:
For example, it takes three minutes for exec to execute A script, and php returns the result and output content of A script three minutes later. In the three minutes that I need to execute exec, each output line can get the output in real time. Is there any better way to do this?
Modify the issue of the blogger. No one else understands your intention. execute another script by calling the exec () function in php. Suppose you want to display exec () in the current script () the content of the script being executed in real time. The function itself does not seem to be allowed. Please refer to my ideas and wonder if it is the result you want.
Called. out | tail-F ');
popen()
You cannot answer questions if you have enough words. Check the manual.
I think what you need issystem
Function
Both the execution shells are suspended for PHP. Add &
ob_flush();flush();
These two functions can help you. For more information, see the PHP manual.