以下に示すように:
コードをコピーします コードは次のとおりです:
if (isset($_POST['submit'])) {
foreach($_FILES['product_img']['error' ] as $k =>$v){
if ($v == UPLOAD_ERR_OK) {
$sql ='product_img'.($k+1);
$tmp_name = $_FILES['product_img']['tmp_name '][$ k];
$file_name = $_FILES['product_img']['name'][$k];
$file_type = $_FILES['product_img']['type'][$k];
$upload_name = getPath ('../Public/Upload').time().'_'.$file_name;
@move_uploaded_file($tmp_name,$upload_name);
$map[$sql] = $file_name;
print_r ($map) ;
終了;
}
}
}
http://www.bkjia.com/PHPjc/327522.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327522.html技術記事以下に示すように: 次のようにコードをコピーします: if (isset($_POST['submit'])) { foreach($_FILES['product_img']['error'] as $k=$v){ if ($v = = UPLOAD_ERR_OK) { $sql ='product_img'.($k+1); $...