HTML Learning-file Control Learning

Source: Internet
Author: User

Situation one: Do not set enctype

HTML content

<formAction= "02upload.ashx"Method= "POST">    <inputtype= "File"name= "txt" />        <inputtype= "Submit"value= "Upload"/></form>

Request header (The length of the report style, and the type of the newspaper style)

The style of requesting newspaper

Scenario Two: Setting the Enctype property

HTML content

<Body>    <formAction= "02upload.ashx"Method= "POST"enctype= "Multipart/form-data">        <inputtype= "File"name= "txt" />           <inputtype= "Submit"value= "Upload"/>    </form></Body>

Request Request Header

The style of requesting newspaper

Come to the conclusion

1.form If you do not add the Enctype property, only the file name is uploaded

The Enctype default property value for 2.form is application/x-www-form-urlencoded

-----------------------------------Split Line----------------------------------------------------------------------------------- ----------

There is a do not understand, keep the first, later know the complement, which friends know, you can tell me

The message I uploaded is only 10KB, but in two uploads, one accounted for 61bit and one 216bit. It's not going to count.

HTML Learning-file Control Learning

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.