Suddenly think of the previous contact Flash will picture binary system to pass to PHP, brainwave with $globals[' http_raw_post_data '] to get.
So in depth check, originally PHP by default only recognized application/x-www.form-urlencoded standard data type, therefore, to type such as text/xml or soap or Application/octet-stream Such content cannot parse, if use $_post array to receive will fail! Therefore, the prototype is retained and given to $globals[' Http_raw_post_data ' to receive it.
PHP's Http_raw_post_data
With the Content-type=text/xml type, submitting an XML document content to the PHP server, how to obtain this post data.
The raw/uninterpreted HTTP POST information can accessed with: $GLOBALS [' http_raw_post_data '] this is useful in cases Where the post content-type is not something PHP understands (such as Text/xml).
Because PHP only recognizes the application/x-www.form-urlencoded standard data type by default, the contents of a type such as text/xml cannot be parsed into a $_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 used to achieve this function
Php://input allows you to read the original data for the POST. Compared with $HTTP _raw_post_data, it brings less pressure on memory and does not require any special php.ini settings. Php://input cannot be used for enctype= "Multipart/form-data".
Application
A.htm
Copy Code code as follows:
<form action= "post.php" method= "POST" >
<input type= "text" name= "user" >
<input type= "password" name= "password" >
<input type= "Submit" >
</form>
post.php
Copy Code code as follows:
? Echo file_get_contents ("Php://input");? >