总是产生变量包含有原始的 POST 数据。否则,此变量仅在碰到未识别 MIME 类型的数据时产生。不过,访问原始 POST 数据的更好方法是 php://input。$HTTP_RAW_POST_DATA 对于 enctype="multipart/form-data" 表单数据不可用。
问题: $HTTP_RAW_POST_DATA == $_POST 吗?
照手册所写 ,答案应该就为否。
假如不一样的话,他们的区别是什么呢?
我知道答案了,如下:
The RAW / uninterpreted HTTP POst information can be 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).
The RAW / uninterpreted HTTP POST information can be 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).