Not get $globals["Http_raw_post_data" for Mao?

Source: Internet
Author: User
$POSTSTR = $GLOBALS ["Http_raw_post_data"];d UMP ($POSTSTR), $postStr 2 = file_get_contents ("php://input");d UMP ($ POSTSTR2);

For the first case of hair output is null, the second can be output, but it seems that is not what I want.
I didn't use the first one before, so I don't know what the result of the first kind of output is, and it's exactly the same as $_post.


Reply to discussion (solution)

$GLOBALS [' Http_raw_post_data ']: always produces $HTTP _raw_post_data variable contains the original POST data. This variable is only generated when it encounters data that does not recognize the MIME type. $HTTP _raw_post_data is not available for enctype= ' multipart/form-data ' form data.
That is to say, basically $globals[' http_raw_post_data ' is the same as $_post.
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, etc.

I see

The landlord understand what

  • 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.