application/x-www-form-urlencoded

WBOY
Release: 2016-07-29 08:55:51
Original
2426 people have browsed it

application/x-www-form-urlencoded: Form data is encoded as name/value pairs. This is a standard encoding format.
multipart/form-data: Form data is encoded as a message, and each control on the page corresponds to a part of the message.
text/plain: Form data is encoded in plain text without any controls or formatting characters.The enctype attribute of form is the encoding method. There are two commonly used ones: application/x-www-form-urlencoded and multipart/form-data. The default is application/x-www-form-urlencoded.

When the action is get, the browser uses the x-www-form-urlencoded encoding method to convert the form data into a string (name1=value1&name2=value2...), and then appends this string to After the url, split it with ? to load this new url.

When the action is post, the browser encapsulates the form data into the http body and then sends it to the server.

If there is no type=file control, just use the default application/x-www-form-urlencoded.

If there is type=file, multipart/form-data will be used. The browser will divide the entire form into control units, and add Content-Disposition (form-data or file), Content-Type (default is text/plain), name (control name) and other information to each part, and Add delimiter (boundary).

The above introduces application/x-www-form-urlencoded, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!