$path=$_SERVER["DOCUMENT_ROOT"];//服务器路径
$i = 0;
foreach ($_FILES["pictures"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$upload_file=$_FILES['pictures']['tmp_name'][$key];//文件被上传后在服务端储存的临时文件名
$imgtype = strtolower(strrchr($_FILES['pictures']['name'][$key],"."));
$name_1 = strtolower(substr($_FILES["pictures"]["name"][$key],0,2));
$upload_file_name= "lanmayi_".time().$name_1.$imgtype;//以字母及系统时间的秒来做文件名
$store_dir = $path."/up_img/";// 上传文件的储存位置
$file_size_max = 100000000000;// 1M限制文件上传最大容量(bytes)
$accept_overwrite = 0;//是否允许覆盖相同文件
move_uploaded_file($upload_file,$store_dir.$upload_file_name);
$new_img_name = $upload_file_name;
$new_img_type = substr($imgtype,1,3);
$new_img_path = $store_dir;
$suo_name = Makesuo ($new_img_path,$new_img_name,$new_img_type);
$sh_time = date('Y-m-d H:i:s');
$name = $_POST['name'];
$pid = $id;
$sql = "insert into lanmayi_img_show(pid,sh_name,sh_url,sh_suo,sh_time) values (".$pid.",'".$name[$i]."','".$upload_file_name."','".$suo_name."','".$sh_time."')";
$res = mysqli_query($conn,$sql);
$i++;
}
}
//*批量上传结束********************************************************
?>
}
if($_POST['fanhui']){
?>
}
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor