第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

不走else區(qū)間 這樣的情況有大佬出現過嗎

不用框架的時候 都好使 用了tp5? 然后用的route路由 微信配置中的url是?http://www.xxxx/api/wei/check? token 認證是可以的 我在else區(qū)間調用了關注回復 但是沒有回復? 然后我調用了自定義菜單(測試走不走else區(qū)間)還是不行 單獨用自定義菜單是可以的 哪位大佬出現過這個情況

public function check_wei()

? ? {

? ? ? ? if(isset($_GET['echostr'])) {

? ? ? ? ? ? $nonce? ? ?= $_GET['nonce'];

? ? ? ? ? ? $token? ? ?= 'bijiwang123456';

? ? ? ? ? ? $timestamp = $_GET['timestamp'];

? ? ? ? ? ? $echostr? ?= $_GET['echostr'];

? ? ? ? ? ? $signature = $_GET['signature'];

? ? ? ? ? ? $array = array($nonce, $timestamp, $token);

? ? ? ? ? ? sort($array);

? ? ? ? ? ? $str = sha1(implode($array));

? ? ? ? ? ? if($str == $signature ) {

? ? ? ? ? ? ? ? echo $echostr;?

? ? ? ? ? ? ? ? exit;

? ? ? ? ? ? }

? ? ? ? }

? ? ? ? ?$this->sendMsg();

? ? ? ??

? ? }

? ? public function sendMsg()

? ? {

? ? ? ? $post_data = file_get_contents('php://input');//獲得微信推送過得post數據(xml格式)

? ? ? ? file_put_contents('ceshi.txt',$post_data);

? ? ? ? $post_obj = simplexml_load_string($post_data);//處理消息

? ? ? ? if(strtolower($post_obj->MsgType) == 'event') {//判斷是否是訂閱的時間推送

? ? ? ? ? ? if(strtolower($post_obj->Event) == 'subscribe') {//判斷是否是關注事件

? ? ? ? ? ? ? ? $toUser = $post_obj->FromUserName;

? ? ? ? ? ? ? ? $fromUser = $post_obj->ToUserName;

? ? ? ? ? ? ? ? $time = time();

? ? ? ? ? ? ? ? $msgType = 'text';

? ? ? ? ? ? ? ? $content = '歡迎關注';

? ? ? ? ? ? ? ? $template = "

? ? ? ? ? ? ? ? ? ? <xml>

? ? ? ? ? ? ? ? ? ? <ToUserName><![CDATA[%s]]></ToUserName>

? ? ? ? ? ? ? ? ? ? <FromUserName><![CDATA[%s]]></FromUserName>

? ? ? ? ? ? ? ? ? ? <CreateTime>%s</CreateTime>

? ? ? ? ? ? ? ? ? ? <MsgType><![CDATA[%s]]></MsgType>

? ? ? ? ? ? ? ? ? ? <Content><![CDATA[%s]]></Content>

? ? ? ? ? ? ? ? ? ? </xml>

? ? ? ? ? ? ? ? ";

? ? ? ? ? ? ? ? $info = sprintf($template,$toUser,$fromUser,$time,$msgType,$content);

? ? ? ? ? ? ? ? echo $info;

? ? ? ? ? ? }

? ? ? ? }

? ? }


正在回答

0 回答

舉報

0/150
提交
取消

不走else區(qū)間 這樣的情況有大佬出現過嗎

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號