The raw/uninterpreted HTTP POst information can be accessed with:
$GLOBALS [' Http_raw_post_data ']
This was useful in cases where the post content-type are not something PHP understands (such as Text/xml).
In other words, basically $globals[' http_raw_post_data ' and $_post are the same. But if the POST data is not recognized by PHP, you can use $GLOBALS [' Http_raw_post_data '] to receive it, such as text/xml or soap, and so on.
PHP default recognized data type is the application/x-www.form-urlencoded standard data type
With the Content-type=text/xml type, submit an XML document content to the PHP server, how to get this post data.
The raw/uninterpreted HTTP POST information can be accessed with: $GLOBALS [' http_raw_post_data '] This is useful in CAs Es where the post content-type is not something PHP understands (such as Text/xml).
Since PHP only recognizes the application/x-www.form-urlencoded standard data type by default, the contents of the type such as text/xml cannot be parsed into the $_post array, so the prototype is retained and given to $globals[' Http_raw_ Post_data '] to receive.
There is also a php://input that can be implemented with this function
Php://input allows the raw data to be read from the POST. Compared to $HTTP _raw_post_data, it brings less pressure to memory and does not require any special php.ini settings. Php://input cannot be used for enctype= "Multipart/form-data".
Application
A.htm
------------------
<form action= "post.php" method= "POST" >
<input type= "text" name= "user" >
<input type= "password" name= "password" >
<input type= "Submit" >
</form>
post.php
----------------------------
<? Echo file_get_contents ("Php://input"); ?>
$GLOBALS [' Http_raw_post_data '] differs from $_post