<?php header("content-type:text/html;charset=utf-8"); // echo "klkdlkl";die; require_once '../common/php/dbaccess.php'; require_once '../common/php/configSelf.php'; require_once 'sdk_sunpeijun.php'; require_once '../common/php/config.php'; traceHttp(); define("TOKEN", "weixin"); //微信端验证token define('IP', "www.chinwhiz.cn"); $db = new DB(); $wechatObj = new wechatCallbackapiTest(); $access_token = $wechatObj->getAccessToken($appIdSelf, $appSecretSelf); $wx = new wechat($appIdSelf, $appSecretSelf, $access_token); if (isset($_GET['echostr'])) { $wechatObj->valid(); } else { //$wx->sendMsgToAll(); $wechatObj->responseMsg(); // $wechatObj->createMenu(); } class wechatCallbackapiTest { public function valid() { $echoStr = $_GET["echostr"]; if ($this->checkSignature()) { ob_clean(); echo $echoStr;