|
|
@@ -23,6 +23,7 @@ class OfficialNotify extends Controller
|
|
|
$xmlData = file_get_contents('php://input');
|
|
|
$xml = simplexml_load_string($xmlData, 'SimpleXMLElement', LIBXML_NOCDATA);
|
|
|
$Official = new Official();
|
|
|
+ if(!$xml) return 'success';
|
|
|
// 提取关键信息
|
|
|
$fromUsername = (string)$xml->FromUserName; // 用户的公众号OpenID
|
|
|
$toUsername = (string)$xml->ToUserName; // 公众号原始ID
|