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.