$ In php

Source: Internet
Author: User
Obviously, all three are used to obtain data sent to the server through http. Php by default can recognize the data type (MIME) is a applicationx-www.form-urlencoded, the common situation is the form of submission, generally submitted data is like k1v1k2v2k3v3 ...... This form-urlencoded. Php parses this data to $

Obviously, all three are used to obtain data sent to the server through http. By default, php recognizes that the data type (MIME) is application/x-www.form-urlencoded, and forms are usually submitted, generally, the data submitted is like k1 = v1k2 = v2k3 = v3 ...... form-urlencoded. Php parses this data to $

Obviously, all three are used to obtain data sent to the server through http.
By default, php can recognize that the data type (MIME) isapplication/x-www.form-urlencodedThe common case is the submission of forms. Generally, the data submitted is likek1=v1&k2=v2&k3=v3......Form-urlencoded. This data will be parsed by php$_POST, That is, what we usually use in the form submission operation. However, when the post data is a string in xml format, php cannot parse this data type$_POSTArray, but this will$GLOBALSWhich stores the original post data, that is$GLOBALS['HTTP_ROW_POST_DATA']In fact$_POSTThe data in is analyzed from this array and filled$_POST(If it cannot be recognized as urlencoded, It is null ).
That is to say, when we want to receive post data in xml format, we can only use$GLOBALS['HTTP_ROW_POST_DATA']. Of course there is anotherphp://inputThis is the IO stream protocol. php will parse this Protocol to post the element data, that isfile_get_contents('php://input')=$GLOBALS['HTTP_ROW_POST_DATA']

However, when we post binary files to the server, these cannot be identified, suchenctype='multipart/form-data'This MIME, php provides us$_FILESArray.

Support MarkDown in CSDN first. Great!

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.