Re: Displaying progress in php script

From: Date: Wed, 07 May 2003 09:37:28 +0000
Subject: Re: Displaying progress in php script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146633@lists.php.net to get a copy of this message
First, if you are doing any output buffering, you'll need to end and flush the buffer. Second, browsers have a receive buffer of their own, IE has a 4k buffer that has to be filled before it will display data, and even then will only render when it has all the structure it's waiting for, like tables must be completed etc. Then you can try the flush function: http://www.php.net/manual/en/function.flush.php When I was doing this sort of this I used JavaScript to toggle visibility of DIV containers with text labels, for a cool effect. But you'll have to write 4k of hidden comment data or the like to flush the browsers buffers. -- Jason k Larson GMane wrote:
I'm writing a php script which takes a long time to do its stuff (producing thumbnails from movies). Is it possible to display the progress of what's going on. If I do this
    <convert file>
    print "converting file $file<br>"
it only prints the string when the entire page has finished. Is there a way around this?


« previous php.general (#146633) next »