开发微信公众平台中系统是linux的centos7.2。$postStr = $GLOBALS["HTTP_RAW_POST_DATA"];总是为空值,说是php.ini中禁用了register_globals=off改成On就好了,我在我的php.ini中没找到这项。另一种说法是用$postStr = file_get_contents("php://input");替换也可以,但是我也替换了依然接受不到值,折磨一下午了...哭了都~

//响应消息
public function responseMsg()
{
$postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
$postStr = file_get_contents("php://input");
if (!empty($postStr)){
$postObj = simplexm
l_load_string($postStr, 'SimplexmlElement', LIBxml_NOCDATA);
$RX_TYPE = trim($postObj->MsgType);
echo $postStr;
switch ($RX_TYPE)