Public number user Send message background PHP reply no response solution

Source: Internet
Author: User

1. Problem: Public platform official download sample code, using $POSTSTR = $GLOBALS ["Http_raw_post_data"], to get the server push message data. However, some developers find it impossible to receive information when they use it (for example, using Sina Cloud).

2, Reason: its root cause is that the interface configuration URL is located on the server set Register_globals=off. Starting with the PHP4.2.0 version, the default value of Register_globals in the php.ini settings option becomes off.

3. WORKAROUND: 1) Modify the PHP.ini setting to set the Register_globals value to on. If you do not have permission to modify php.ini, the following method is used. 2) This article provides another way to receive messages: In the official example: $POSTSTR = $GLOBALS ["Http_raw_post_data"]; replaced by: $postStr = file_get_contents ("Php://input");



Public number user Send message background PHP reply no response solution

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.