October 23rd, 2000, 06:19 AM
I've done a large PHP script which can take a long time to run. This script has to have an echo every so often so that it doesn't time out. I've been looking for quite a while for a way of updating a PHP page so that the text will actually be shown on the screen as it outputs rather than when all the script has finished.
<% Response.Buffer=True %>
<% Response.Flush %>
which actually updates the page. Is there anyway of implementing this in PHP or something like it.
October 23rd, 2000, 06:53 AM
For individual (what you call "updates") you can use flush().
There is a directive that you can use in php.ini that has the effect of flush()ing the output after every output command (eg print(), echo(), printf() etc) although it will slow down your script dramatically and increase server load. It's in the standard dist of php.ini.
Hope that helps,