This article mainly introduces the PHP jquery multiple file Upload simple examples, the need for friends can refer to
Code as follows: <div id= "Mulitplefileuploader" >Upload</div> <div id= "status" ></div > <script> $ (document) Ready (function () { var settings = { &NBSP ; URL: "upload.php", method: "POST", allowedtypes: "Jpg,png,gif,doc,pdf,zip ", fileName:" MyFile ", Multiple:true, onsuccess:function (f ILES,DATA,XHR) { $ ("#status"). HTML ("<font color= ' green ' >UPL Oad is success</font> "); }, onerror:function (files,status,errmsg) { & nbsp $ ("#status"). HTML ("<font color= ' Red ' >upload is Failed</font > "); } } $ ("#mulitplefileuploader"). UploadFile (settings); }); </script> upload.php code as follows: <?php //if directory doesnot create it . $output _dir = ". /upload "; if (Isset ($_files["myfile")) { $ret = array (); $erro R =$_files["MyFile" ["Error"]; { !is_array if ($_files["myfile"] [' name '])//single file &nb Sp { $fileName = $_files["MyFile"] ["name"]; &nbs P Move_uploaded_file ($_files["myfile"] ["Tmp_name"], $output _dir. $_files[" MyFile "] [" name "]); //echo "<br> error:" $_files["myfile" ["Error"]; $ret [$fileName]= $output _dir. $fileName; { Else &NBsp { $fileCount = count ($_files["M Yfile "[' name ']]; for ($i =0 $i < $fileCount $i + +) &N Bsp { $fileName = $_files["MyFile" ["Name"] [$i]; $ret [$fileName]= $output _dir. $fileName; Move_uploaded_file ($_files["myfile"] ["tmp_name"] [$i],$ Output_dir. $fileName); } } echo Json_encode ($ret); } ?>