You can use the following section of code to specifically understand the PHP bulk upload pictures of the specific way. When we are learning PHP, we must accumulate experience from the actual operation to consolidate the knowledge we have learned and gradually strengthen our programming level.
PHP Protection of file system specific code sharing
PHP Specific code example for protecting a database
• Explore the main areas of PHP application
• Application analysis of Ajax technology based on PHP
PHP to limit the size of the upload file the php batch upload picture code is as follows:
Copy Code code as follows:
<
Html
>
<
Head
>
<
Title
>
Uploadpicturemoreonce
</
Title
>
</
Head
>
<
Body
>
<
Form
action=
""
Method=
"POST"
Enctype=
"Multipart/form-data" >
<
>
Pictures:
<
Br
/>
<
Input
Type=
"File"
Name=
"Pictures[]"
/>
<
Br
/>
<
Input
Type=
"File"
Name=
"Pictures[]"
/>
<
Br
/>
<
Input
Type=
"File"
Name=
"Pictures[]"
/>
<
Br
/>
<
Input
Type=
"Submit"
Name=
"Upload"
Value=
"Send"
/>
</
>
</
Form
>
</
Body
>
</
Html
>
?
Php
if ($_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);
}
}
}
?>
The above code is a lot of PHP upload pictures of all programming, hope to have the help of students need.