PHP Bulk upload pictures of the specific implementation of the introduction. _php Tutorials

Source: Internet
Author: User
You can use the following section of code, to learn more about how PHP bulk upload pictures in specific ways. When we are learning PHP, we must gradually accumulate experience from the actual operation, in order to consolidate the knowledge we have learned and strengthen our programming level.

PHP-specific code sharing for protected file systems
PHP Specific code examples for protecting databases
• Explore the main areas of PHP application
• Application-specific analysis of AJAX technology based on PHP
PHP The specific solution to limit the size of uploaded files php bulk upload the image code as follows:
Copy the 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 PHP bulk upload pictures of all programming, I hope to have the necessary students to help.

http://www.bkjia.com/PHPjc/736852.html www.bkjia.com true http://www.bkjia.com/PHPjc/736852.html techarticle You can use the following section of code, to learn more about how PHP bulk upload pictures in specific ways. When we are learning PHP, we must gradually accumulate experience from the actual operation, in order to gong ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.