Progress bar using PHP
Upload progress bar
An extension to track progress of a file uploads. It is only known to work on Apache and at least PHP 5.2 is needed.
To Install
In windows it’s quite easy just copy and paste the uploadprogress.dll extension and enables the extension in the php configuration file and that’s it.
However in linux or unix, installation is different you need to either install it from the site http://pecl.php.net/package/uploadprogress via a pear or pecl in the server or download the stable release from the site and then install.
What to configure in php.ini
[uploadprogress]
extension=uploadprogress.dll
uploadprogress.file.contents_template = "c:\temp\upl_%s.txt" uploadprogress.file.filename_template = "c:\temp\upl_%s.txt"
uploadprogress.file.upload_identifier="UPLOAD_IDENTIFIER"
uploadprogress.update_interval=500
uploadprogress.delete_finished=1
(please set the path as per linux where it says c:\temp\upl_%s.txt)
after adding this lines in php.ini create a folder temp in a location set in the above php.ini
That’s all … and start running the progressbar
The progress bar is tested in firefox and IE and is working fine.
1 Comments:
A blog is too dry with just code samples. Check out a blog like http://www.codinghorror.com/blog/ which discusses code in an interesting way.
There are so many interesting things to put on this if you have a company. Challenges faced, things learnt, successes, outings, new developments, views on other blog posts related to work you do, etc.
My 2 cents, hope it helps
Post a Comment
Links to this post:
Create a Link
<< Home