{"action":"opened","issue":{"url":"https://api.github.com/repos/CompSchool/ThinkPHP/issues/1","repository_url":"https://api.github.com/repos/CompSchool/ThinkPHP","labels_url":"https://api.github.com/repos/CompSchool/ThinkPHP/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/CompSchool/ThinkPHP/issues/1/comments","events_url":"https://api.github.com/repos/CompSchool/ThinkPHP/issues/1/events","html_url":"https://github.com/CompSchool/ThinkPHP/issues/1","id":220629285,"number":1,"title":"微信用户发送消息没有反应","user":{"login":"chenxhjeo","id":23403172,"avatar_url":"https://avatars0.githubusercontent.com/u/23403172?v=3","gravatar_id":"","url":"https://api.github.com/users/chenxhjeo","html_url":"https://github.com/chenxhjeo","followers_url":"https://api.github.com/users/chenxhjeo/followers","following_url":"https://api.github.com/users/chenxhjeo/following{/other_user}","gists_url":"https://api.github.com/users/chenxhjeo/gists{/gist_id}","starred_url":"https://api.github.com/users/chenxhjeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenxhjeo/subscriptions","organizations_url":"https://api.github.com/users/chenxhjeo/orgs","repos_url":"https://api.github.com/users/chenxhjeo/repos","events_url":"https://api.github.com/users/chenxhjeo/events{/privacy}","received_events_url":"https://api.github.com/users/chenxhjeo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-10T12:30:42Z","updated_at":"2017-04-10T12:30:42Z","closed_at":null,"body":"1、问题：微信公众平台官方提供下载的示例代码中，使用$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];来获取微信服务器推送的消息数据。但是有的开发者在使用的过程中发现无法接收到信息(例如使用了新浪云)。\r\n2、原因：其根本原因在于接口配置的url所在服务器设置了register_globals=off。 从PHP4.2.0版本开始，php.ini设置选项中register_globals的默认值变成了off。\r\n\r\n3、解决方法：\r\n1）修改php.ini设置，将register_globals值设置为on。如果没有权限修改php.ini，则采用以下方法。\r\n2）本文提供另一种接收消息的方式： \r\n   将官方示例中：$postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"]; \r\n   替换为：        $postStr = file_get_contents(\"php://input\"); "}}
{"actor":{"display_login":"chenxhjeo"}}