HTML5
<form action="./action.php" method="post" enctype="multipart/form-data">
<fieldset style="border: 1px #aaaaaa solid;padding:5px;margin-bottom:10px;">
<legend>上传产品图片</legend>
<b>上传产品图片:</b>
<p><input name="picall[]" type="file" multiple="multiple" /></p>
<input type="submit" value="上传" class="button">
<small></small>
</fieldset>
</form>
PHP
if(isset($_FILES['picall'])){
$path = $_SERVER['DOCUMENT_ROOT'].'/Uploads/images/Products/';
for($i=0; $i<count($_FILES['picall']['name']); $i++) {
//Get the temp file path
$tmpFilePath = $_FILES['picall']['tmp_name'][$i];
//Make sure we have a filepath
if ($tmpFilePath != ""){
//Setup our new file path
$newFilePath = $path . $_FILES['picall']['name'][$i];
//Upload the file into the temp dir
move_uploaded_file($tmpFilePath, $newFilePath);
}
}
exit;
}