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

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

怎么進(jìn)入代碼實(shí)現(xiàn)?

從第一講進(jìn)入第二講,有一個(gè)代碼實(shí)現(xiàn)部份,怎么過(guò)渡到代碼實(shí)現(xiàn)?

正在回答

1 回答

????public?function?pushWxMsg(){

????????//1.獲取到access_token

????????$access_token?=?'獲取到access_token';

????????$url?=?"https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="?.?$access_token;

????????$array?=?array(

????????????'touser'?=>?"用戶openid",?//用戶openid

????????????'template_id'?=>?"在公眾號(hào)下配置的模板id",?//在公眾號(hào)下配置的模板id

????????????'url'?=>?"http://idcbgp.cn/course/qa/id/618/t/0?page=1",?//點(diǎn)擊模板消息會(huì)跳轉(zhuǎn)的鏈接

????????????'data'?=>?array(

????????????????'first'?=>?array('value'?=>?"兼職平臺(tái)簽到測(cè)試開始",?'color'?=>?"#FF0000"),

????????????????'keyword1'?=>?array('value'?=>?'兼職崗位小區(qū)門口賣西瓜',?'color'?=>?'#FF0000'),?//keyword需要與配置的模板消息對(duì)應(yīng)

????????????????'keyword2'?=>?array('value'?=>?time(),?'color'?=>?'#FF0000'),?//keyword需要與配置的模板消息對(duì)應(yīng)

????????????????'remark'?=>?array('value'?=>?"兼職平臺(tái)簽到測(cè)試結(jié)束,收到請(qǐng)釘釘回復(fù)一下",?'color'?=>?"#FF0000"),

????????????),

????????);

????????$json_template?=?json_encode($array);

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

????????$res?=?$this->curl_post($url,?$json_template);

????????dump($res);

????}


????/**

?????*?@param?$url

?????*?@param?array?$data

?????*?@return?mixed

?????*?curl請(qǐng)求

?????*/

????function?curl_post($url,?$data?=?array())

????{

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

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

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

????????curl_setopt($ch,?CURLOPT_SSL_VERIFYPEER,?FALSE);

????????curl_setopt($ch,?CURLOPT_SSL_VERIFYHOST,?FALSE);

????????//?POST數(shù)據(jù)

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

????????//?把post的變量加上

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

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

????????curl_close($ch);

????????return?$output;

????}


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

舉報(bào)

0/150
提交
取消

怎么進(jìn)入代碼實(shí)現(xiàn)?

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

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

幫助反饋 APP下載

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

公眾號(hào)

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