processor.php文件消息回复功能开发不能使用全局变量$_W问题


因为还未触发到系统主动获取,因此需要手动来调用接口函数来获取。

public function respond() {
	global $_W, $_GPC;
	$account_api = WeAccount::create();
	$info = $account_api->fansQueryInfo($this->message['from']);
	$nickname = $info["nickname"];
	return $this->respText('欢迎你 : ' . $nickname);
}

猜你喜欢

转载自blog.csdn.net/qq_39940866/article/details/77916400