Ad

Creating A File Progress Bar In PHP

- 1 answer

Does anyone know of any methods to create a file upload progress bar in PHP? I have often heard that it's impossible.

I have one idea, but not sure if it would work: have a normal file upload, but instead submit to an iframe. When this is submitted, store the file information (size and temp location) in the session. At the same time, start an AJAX call to every say 10 seconds to check the size of the file compared to the size stored in the session. This would return the size to the AJAX and then a progress bar would be sized and maybe display the uploaded size to the user.

Thoughts?

Ad

Answer

You can try YUI or Prototype or JQuery

Ad
source: stackoverflow.com
Ad