: This article mainly introduces the differences between php $ _ POST and php: input. For more information about PHP tutorials, see. 1. $ _ POST and php Tutorial: input can get the value, $ HTTP_RAW_POST_DATA is empty $ _ POST organizes the submitted data in an associated array and encodes it, such as urldecode, even php: input can be converted to code. This function can be used to obtain the original POST
2. using the curl post method to transmit json is unacceptable in our conventional $ _ POST method. one method is acceptable, that is, a layer of array outside the json data layer, use file_get_contents ("php: // input") to receive post data, without the need to package array
3. simulate a form to see the following:
Post. php
Php: // input allows reading original POST data. Compared with $ HTTP_RAW_POST_DATA, it puts less pressure on the memory and does not require any special php. ini settings. Php: // input cannot be used for enctype = "multipart/form-data ".
Php $ _ POST
The $ _ POST variable is an array with the variable name and value sent by the http post method.
The $ _ POST variable is used to collect the values in the form from method = "post. The information sent from a form with the POST method is invisible to anyone (not displayed in the address bar of the browser) and there is no limit on the amount of information sent.
Html
Welcome. php
Welcome .
You are Years old!
Variables sent through http post are not displayed in the URL.
Variable has no length limit
The above introduces the differences between php $ _ POST and php: // input, including some content, and hope to help those who are interested in PHP tutorials.