•PHP保护文件系统的具体代码分享
•PHP保护数据库的具体代码示例
•探讨主要的PHP应用领域
•基于PHP的AJAX技术的具体应用解析
•PHP限制上传文件大小的具体解决办法PHP批量上传图片的代码如下:
<以上代码就是PHP批量上传图片的全部编程,希望对有需要的同学有所帮助。
html
><
head
>
<
title
>
uploadpicturemoreonce
</
title
>
</
head
><
body
><
formaction=
""
method=
"post"
enctype=
"multipart/form-data">
Pictures:
<
br/>
<
inputtype=
"file"
name=
"pictures[]"
/>
<
br/>
<
inputtype=
"file"
name=
"pictures[]"
/>
<
br/>
<
inputtype=
"file"
name=
"pictures[]"
/>
<
br/>
<
inputtype=
"submit"
name=
"upload"
value=
"Send"
/></
form
></
body
></
html
><?
phpif($_POST['upload']=='Send'){
$dest_folder=
"picture/";18.if(!file_exists($dest_folder)){19.mkdir($dest_folder);}
foreach($_FILES["pictures"]["error"]as$
key=
>
$error){if($
error==UPLOAD_ERR_OK){$tmp_name=$_FILES["pictures"]["tmp_name"][$key];
$name=$_FILES["pictures"]["name"][$key];
$uploadfile=$dest_folder.$name;26.move_uploaded_file($tmp_name,$uploadfile);
}
}
}
?>