This article describes how to upload a file and display the upload progress in php. The example analyzes the php file transfer and transmission progress display skills, which is of great practical value, for more information about how to upload files in php and display the upload progress, see the following example. Share it with you for your reference. The details are as follows:
Remember to make the file bigger when you upload it. Otherwise, the file will be uploaded even if you haven't seen it yet, and the file to be uploaded should not be too large. if you want to upload the file to G, I tried it for 2 GB, and PHP couldn't stand it, I tested more than 300 M. remember to adjust the small php. ini parameter Ah "select file =" submit = "Get information" needs to be done in one breath ^
<? Php $ prefix = ini_get ('session. upload_progress.prefix'); $ name = ini_get ('session. upload_progress.name '); $ key = $ prefix. $ name; session_start (); if (isset ($ _ POST ['get _ info']) {$ logo = $ prefix. $ _ POST ['logo ']; exit (json_encode ($ _ SESSION [$ logo]);} elseif ($ _ POST) {echo 'script var finashed = true; script ';}?>