Rumah > Soal Jawab > teks badan
<!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 "/& gt;
& lt; title & gt; dokumen untitled & lt;/title & gt;
& lt;/kepala & gt; ';
$ appsecret =' 872a95a04a7e1bd78e3f0101020ac195f1 '; {$appId}&secret={$appSecret}";
$respons = file_get_contents($url);
$result = json_decode($response, true);
$accessToken = $result['access_token'] ;
//Buat struktur JSON bar menu bawah
$menu = tatasusunan(
'butang' => tatasusunan(
; B 'sub_butang' = & gt; tatasusunan (
(
'jenis' = & gt; 'lihat',
// Hantar permintaan untuk mencipta bar menu bawah
= "https://$url 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_POSTFIELDS, urldecode($data));curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = $response =$chl curl ($ch);. kod dijalankan, Paparan berjaya, tetapi bar menu bawah akaun rasmi WeChat tidak boleh dibuat