Today, a little research on the multi-image upload function, the following code to organize out, to facilitate their own use and for everyone to communicate
1, upload.html page, that is, the first input type=file file:
Copy CodeThe code is as follows:
<title></title>
2, do_upload.php page, that is, processing multi-File upload page:
Copy CodeThe code is as follows:
Global Array $_files
$_files[' UserFile ' [' tmp_name '] files are temporarily stored in the Web server location
$_files[' UserFile ' [' name '] The file name in the user system
$_files[the byte size of the ' userfile ' [' Size '] File
MIME type of $_files[' userfile ' [' type '] file, text/plain,image/gif
$_files[' userfile ' [' ERROR '] error code associated with file upload
?>
Using a For loop to get the passed data is a three-dimensional data
for ($i =0; $i
{
$upfile = $new _folder. " /". $_files[' userfile ' [' name '] [$i];//Here you can modify the
if (move_uploaded_file ($_files[' userfile '] [' tmp_name '] in accordance with your own needs [$i ], $upfile) {
echo "). ( $i + 1). " Image upload succeeded
";
}
else{
echo "First". ( $i + 1). " Image cannot be uploaded
";
}
}
?>
http://www.bkjia.com/phpjc/326834 . html www.bkjia.com true http://www.bkjia.com/phpjc/326834.html techarticle Today, a little research on multi-image upload function, the following code to sort out , convenient for their own use and for everyone to Exchange 1, upload.html page, that is, the first input type=f ...