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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

哪位大神告訴我下為啥我的微信菜單欄中文里面顯示的是%A這種形式

? ? public ?function defineItem(){

? ? ? ? header('content-type:text/html;charset=utf-8');

? ? ? ? $access_token= getWxAccessToken();

? ? ? ? $url="https://api.weixin.qq.com/cgi-bin/menu/create?access_token=".$access_token;

?

$postArr=array(

? ? ? ? ? ? 'button'=>array(

? ? ? ? ? ? ? ? array(

? ? ? ? ? ? ? ? ? ? 'name'=>urlencode('a1'),

? ? ? ? ? ? ? ? ? ? 'type'=>'click',

? ? ? ? ? ? ? ? ? ? 'key'=>'item1',

? ? ? ? ? ? ? ? ),

? ? ? ? ? ? ? ? array(

? ? ? ? ? ? ? ? ? ? 'name'=>urlencode('a2'),

? ? ? ? ? ? ? ? ? ? 'sub_button'=>array(

? ? ? ? ? ? ? ? ? ? ? ? array(

? ? ? ? ? ? ? ? ? ? ? ? ? ? 'name'=>urlencode('歌曲'),

? ? ? ? ? ? ? ? ? ? ? ? ? ? 'type'=>'click',

? ? ? ? ? ? ? ? ? ? ? ? ? ? 'key'=>'songs'

? ? ? ? ? ? ? ? ? ? ? ? ),//第一個(gè)二級(jí)菜單

? ? ? ? ? ? ? ? ? ? ? ? array(

? ? ? ? ? ? ? ? ? ? ? ? ? ? 'name'=>urlencode('電影'),

? ? ? ? ? ? ? ? ? ? ? ? ? ? 'type'=>'view',

? ? ? ? ? ? ? ? ? ? ? ? ? ? 'url'=>'http://www.baidu.com'

? ? ? ? ? ? ? ? ? ? ? ? ),//第二個(gè)二級(jí)菜單

? ? ? ? ? ? ? ? ? ? )

? ? ? ? ? ? ? ? ),


? ? ? ? ? ? ? ? array(

? ? ? ? ? ? ? ? ? ? 'name'=>urlencode('a3'),

? ? ? ? ? ? ? ? ? ? 'type'=>'view',

? ? ? ? ? ? ? ? ? ? 'url'=>'http://www.qq.com',

? ? ? ? ? ? ? ? ),//第三個(gè)一級(jí)菜單


? ? ? ? ));

? ? ? ? $postJson=json_encode($postArr);

? ? ? ??

? ? ? ? $res = $this->http_curl($url,'post','json',$postJson);

? ? ? ?


}

public function http_curl($url,$type='get',$res='json',$arr=''){


? ? ? ? //1.初始化curl

? ? ? ? $ch ?=curl_init();

? ? ? ? //2.設(shè)置curl的參數(shù)

? ? ? ? curl_setopt($ch,CURLOPT_URL,$url);

? ? ? ? curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);


? ? ? ? if($type == 'post'){

? ? ? ? ? ? curl_setopt($ch,CURLOPT_POST,1);

? ? ? ? ? ? curl_setopt($ch,CURLOPT_POSTFIELDS,$arr);

? ? ? ? }

? ? ? ? //3.采集

? ? ? ? $output =curl_exec($ch);


? ? ? ? //4.關(guān)閉

? ? ? ? curl_close($ch);

? ? ? ? if($res=='json'){

? ? ? ? ? ? if(curl_error($ch)){

? ? ? ? ? ? ? ? //請(qǐng)求失敗,返回錯(cuò)誤信息

? ? ? ? ? ? ? ? return curl_error($ch);

? ? ? ? ? ? }else{

? ? ? ? ? ? ? ? //請(qǐng)求成功,返回錯(cuò)誤信息


? ? ? ? ? ? ? ? return json_decode($output,true);

? ? ? ? ? ? }

? ? ? ? }

? ? ? ? echo var_dump( $output );

? ? } ?


正在回答

1 回答

$postJson=json_encode($postArr);這里改成$postJson = ?urldecode(json_encode( $postArr ) );

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

qq_玻璃娃娃_1 提問者

非常感謝!
2016-10-23 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

哪位大神告訴我下為啥我的微信菜單欄中文里面顯示的是%A這種形式

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)