$ HTTP_RAW_POST_DATA for php beginners

Source: Internet
Author: User
$ HTTP_RAW_POST_DATA for php beginners Deprecated: Automatically populating $ HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. to avoid this warning set 'always _ populate_raw_post_data 'to'-1' in php. ini and use the php: // input stream instead. in Unknown on line 0

I reported this error when I made a small example. on the Internet, I set always_populate_raw_post_data to '-1', but I went to php. ini and checked it. the default setting is-1. Which of the following experts can give you some advice?


Reply to discussion (solution)

Deprecated
Apparently, your php version is relatively high.
$ HTTP_RAW_POST_DATA is about to be canceled (already) in the release notes of the php version. please use the declaration read from php: // input.

It turns out to be $ s = $ HTTP_RAW_POST_DATA;
$ S = file_get_contents ('php: // input ');
Just a few more words.

$ HTTP_RAW_POST_DATA is discarded and will be removed in future php versions.
Let you use php: // input instead

$ GLOBALS ['http _ RAW_POST_DATA ']

This feature has been DEPRECATED as of PHP 5.6.0. Relying on this feature is highly discouraged.
$ HTTP_RAW_POST_DATA contains the original data submitted by POST.

In general, use php: // input instead of $ HTTP_RAW_POST_DATA.

I just used the POST method.

$ HTTP_RAW_POST_DATA has been deprecated.
File_get_contents ('php: // input ');

The same is true for $ GLOBALS ['http _ RAW_POST_DATA ']
Maybe an upgraded version of HTTP_RAW_POST_DATA will be empty when it is read.
Replace it with file_get_contents ('php: // input ').

Deprecated: Automatically populating $ HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. to avoid this warning set 'always _ populate_raw_post_data 'to'-1' in php. ini and use the php: // input stream instead. in Unknown on line 0

$ HTTP_RAW_POST_DATA has been discarded. Therefore, use file_get_contents ('php: // input'); to obtain

Phpstorm cracked version cannot use the post method

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.