[thelist] PHP File upload suggestions
Juha Suni
juha at ilmiantajat.fi
Mon Feb 14 03:27:10 CST 2005
Burhan Khalid wrote:
> Theodore Serbinski wrote:
>> Yeah users all would be on broadband connections.
>>
>> As for using PHP to update the % completion, how would one go about
>> doing this? I didn't think this was possible???
>
> Plenty of ways to do this. One of them is the HTML_Progress class
> over at pear (that's pear.php.net).
>
> Its not 100% PHP (obviously), but PHP + Javascript.
It is possible to do this also 100% PHP, as I briefly described in a tip for
thelist about 2 weeks ago. This method basically uses flush() to push data
to the browser during a PHP-loop (and as such, is suitable for almost any
time consuming PHP-scripts). It is not 100% foolproof however, since some
proxies may force buffering despite the flushing.
You can see a simple demo of it in action (just looping sleep() for several
times) in:
http://www.ilmiantajat.net/testing/zuni/phpmailer/progressbar.php
I can give more information if you wish.
--
Suni
More information about the thelist
mailing list