Home > Web Front-end > HTML Tutorial > A little basic knowledge of html form to implement file upload_html/css_WEB-ITnose

A little basic knowledge of html form to implement file upload_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:42:25
Original
1129 people have browsed it

Form used to submit files needs to modify its entype attribute.

enctype attribute: Specifies how to encode form data before sending it.

By default, the encoding format of enctype is application/x-www-form-urlencoded, which cannot be used for file upload;

When you need to upload files, you need to change the encoding method to: multipart/form -data

The following is an introduction to the value of the enctype attribute:

application/x-www-form-urlencoded: [default] when sending Pre-encode all characters (spaces are converted to " " plus signs, special symbols are converted to ASCII HEX values)

multipart/form-data: Do not encode characters. This value is required when using a form that contains a file upload control.

text/plain: spaces are converted to " " plus signs, but special characters are not encoded.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template