There are three types of enctype form
application/x-www-form-urlencoded |
Encode all characters before sending (default) |
Multipart/form-data |
Character encoding is not. You must use this value when you use a form that contains a file upload control. |
Text/plain |
Spaces are converted to "+" plus signs, but special characters are not encoded. |
Application/x-www-form-urlencoded is the default form send data, formatted as name=valse& name2=value2
Multipart/form-data is commonly used in picture streams
Text/plain is typically the encoding of the default program's sending data stream.
At the end of the PHP acceptance. The Text/plain method is not able to get the data using the $_post method. It is possible to $GLOBALS [' Http_raw_post_data '] , since PHP only recognizes the application/x-www.form-urlencoded standard data type by default, so the type is text/ The contents of XML cannot be parsed into an $_post array, so the prototype is retained and given to $http_raw_post_dat to receive.
$HTTP _raw_post_data only works if the Content-type type of POST is not recognized by PHP, but file_get_contents ("Php://input"), but can application/ x-www-form-urlencoded to get the corresponding stream Multipart/form-data No, that is, not multipart/form-data or application/ X-www-form-urlencoded of the time.
However, $post can obtain the corresponding key value in Multipart/form-data application/x-www-form-urlencoded, but not in Text/plain encoding.
Http://blog.sina.com.cn/s/blog_4657e98e0100dyxp.html
Http://developer.51cto.com/art/200912/168103.htm
Http://blog.sina.com.cn/s/blog_6f78e9030100rc9z.html