记微信开发(关注回复)
在刚才增加的关键词回复代码上面添加代码:
$ev = $postObj->Event; if ($ev = "subscribe") { $msgType = "text"; $contentStr = "感谢您的关注!"; $resultStr = sprintf($textTpl, $fromUsername, $toUsername, $time, $msgType, $contentStr); echo $resultStr; }
测试效果:
时间: 2024-11-03 03:46:47