By Justin Silverton
This progess meter is based on the yahoo user interface library and alternative php cache (APC). You will need both of these for it to display properly. PHP 5.2.0 or higher is also required. (I have written a previous article on alternative PHP cache here).
The yahoo user interface library can be found here.
How it works
Once APC is installed and configured, the following needs to be added to your php.ini:
apc.rfc1867 = on
Aside from the Yahoo libraries, this is what makes the progress meter possible using php.
This is called the File Upload Progress hook handler and it is only available
if you compiled APC against PHP 5.2.0 or later. When enabled
any file uploads which includes a field called
APC_UPLOAD_PROGRESS before the file field in an upload form
will cause APC to automatically create an upload_
user cache entry where is the value of the APC_UPLOAD_PROGRESS form entry.

Download
Demo can be found here
Source can be found here
效果演示:http://progphp.com/progress.php
源码 :http://progphp.com/progress.phps
参考资料:http://www.whenpenguinsattack.com/2006/12/12/how-to-create-a-php-upload-progress-meter/