This article mainly introduces PHP multiple file upload implementation code, need friends can refer to the following
index_uploads.php Code as follows: <html> <head> <meta charset= "Utf-8" > & Lt;title>index_uploads</title> </head> <body> <form action= "uploads.php" method = "POST" enctype= "Multipart/form-data" > <input type= "file" Name= "file[]" > & nbsp <br> <input type= "file" name= "file[" "> & lt;br> <input type= "Submit" value= "uploads" > </form> </BODY&G T </html> uploads.php code as follows: <?php Header ("cont Ent-type:text/html;charset=utf-8 "); echo "<pre>"; Print_r ($_files); echo "</pre>"; $count = count ($_files[' file '] [' name ']); for ($i = 0; $i < $count; $i + +) { & nbsp $tmpfile = $_files[' file ' [' Tmp_name '] [$i]; $filefix = Array_pop (Explode (".", $_files[' file '] [' name '] [$i]); $dstfile = "uploads/files/". Time (). _ ". Mt_rand ().". ". $filefix; if (Move_uploaded_file ($tmpfile, $dstfile)) { echo "<script>alert (' succeed! '); window.location.href= ' index_uploads.php ';</script> '; } else { & nbsp echo "<script>alert (' fail! '); window.location.href= ' index_uploads.php ';</script> '; } { core:<1> upload nam for input in homepage The E property is set this way. <2> upload multiple files with a while loop.