On Tue, Apr 29, 2008 at 3:45 PM, Howard Lowndes <[EMAIL PROTECTED]> wrote: > I have a need to output a progress counter from a PHP script that takes a > while to run whilst writing a large number of records out to an SQL > database, mainly so that the user knows that things are still happening > and not hung. > > It seems a simple thing to do, but when I try it, the progress counter > (say, every 100 records) instead of being output at the correct time, gets > delayed until the whole process has finished. > > What is the best way to get around this problem.
not necessarily the *best* way: <?php $i = 0; do { print "hai thar<br />"; flush(); sleep(1); $i++; } while ($i < 15); ?> -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html