Hi,
I'd like to find a simple way to follow execution of a php script in "real time".
Actually, when I call a php script from a web page, the script is executed by the server, and the result of the script is displayed at the end of its execution (by the mean of "print" statements).
I'm working on big scripts taking a lot of time.
I would like to output some information to the web browser before reaching the end of the script, and if possible update information in "real-time", from the start of the script to the end of the script.
What is the correct mean to achieve this ?
Is there a simple mean to do that, playing with HTML headers (Flush()) ?
Send real-time php script status to web browser
Moderator: General Moderators
Look at my posts here viewtopic.php?t=12436&highlight=sleep
The code is a bit broken cos of the forum crash a while ago
The code is a bit broken cos of the forum crash a while ago
Re: Send real-time php script status to web browser
Thats not accurate.auroch wrote:Hi,
I'd like to find a simple way to follow execution of a php script in "real time".
Actually, when I call a php script from a web page, the script is executed by the server, and the result of the script is displayed at the end of its execution (by the mean of "print" statements).
If you do NOT use output buffering, the result is printed as it proceeds - not at the end of the script.
And yes, if you want to make absolutely, totally sure, you can do a flush.auroch wrote: I'm working on big scripts taking a lot of time.
I would like to output some information to the web browser before reaching the end of the script, and if possible update information in "real-time", from the start of the script to the end of the script.
What is the correct mean to achieve this ?
Is there a simple mean to do that, playing with HTML headers (Flush()) ?