国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

哪位大神幫忙看一下錯誤
P粉524549047
P粉524549047 2023-12-14 09:52:50
0
0
593

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv= "Content-Type" content="text/html; charset=utf-8" />

<title>無標題文件</title>

#</head>

<?php

// 替換為你自己的AppID和AppSecret

$appId = 'wxd95fca43ae595a61';

$appSecret = '872a95a04a7e1bd78e3f#$appSecret = '872a95a04a7e1bd78e3f ';


// 取得Access Token

$url = "https://api.weixin.qq.com/cgi-bin/token? grant_type=client_credential&appid={$appId}&secret={$appSecret}";

$response = file_get_contents($url);

$result = json_decode($response, true);


##家

#$accessToken = $result['access_token'];

######// 建立底部選單列的JSON結(jié)構(gòu)######$menu = array( ######? ? 'button' => array(#####? ? ? ? array(#######? ? ? ? ? ? 'name' =>?; array(######? ? ? ? ? ? ? ? array(######? ? ? ? ? ? ? ? ? ?gt; '安川',######? ? ? ? ? ? ? ? ? ? ' url' => 'https://www.example.com/submenu1',######? ? ? ? ? ? ? ? ),######? ? ? ??'type' => 'click' ,######? ? ? ? ? ? ? ? ? ? 'name' => '發(fā)那科',######? ? ? ? ? ? ?與#00, #? ? ? ? ? ? ? ? ),#######? ? ? ? ? ? ),#######? ? ? ? ), '故障查詢',###### 'sub_button' => array(######? ? ? ? ? ? ? ? array(######? ? ? ? ? ? ?? ? 'name' => '安川',## ####? ? ? ? ? ? ? ? ? ? 'url' => 'https://www.example.com/submenu1',#####? ? ? ?? #?####? ? ? ? ? ? ? ? ? ? 'type' = > 'click',######? ? ? ? ? ? ? ? ? ? 'name' => '發(fā)那科』,###

? ? ? ? ? ? ? ? ? ? 'url' => 'https://www.example.com/submenu1',

? ? ? ?? # ? ?# #??? ? ? ),

? ? ? ? array(

? ? ? ? ? ? 'name' => '故障查詢',

? ? ? ? ?? 'sub_button'

#? ? ? ? ?

## 'type' => 'view',

? ? ? ? ? ? ? ? ? ? 'name' => '安川',

##? ? ? ? 100 ?',

? ? ? ? ? ? ? ? ),

? ? ? ? ? ? ? ? array(

#?? ? ? ? ? ? ? ? ? 'name' => '發(fā)那科',

? ? ? ? ? ? ? ? ? ? 'url' => 'https://www.example.com/submenu1',

? ? ?# ),

? ? ),

);

#// 將選單結(jié)構(gòu)轉(zhuǎn)換為JSON字串並進行URL編碼

#$data = json_encode($menu, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);

$data = urlencode($data);

#// 發(fā)送請求請求建立底部選單列

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

#$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDSDS , urldecode($data));


curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

curl_close($ch) ;

// 檢查請求回傳結(jié)果

$result = json_decode($response, true);

if ($result[ 'errcode'] == 0) {

? ? echo '建立底部功能表列成功';

} else {

? ? echo '建立底部功能表列失?。? . $ result['errmsg'];


}

#>

#以上程式碼運行後,顯示成功,但不能建立微信公眾號底部選單列

P粉524549047
P粉524549047

全部回覆(0)
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板