复制代码 代码如下:
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);
exit;
}
}
}
您可能感兴趣的文章:
如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!
网友评论