当前位置 : 主页 > 网络编程 > PHP >

tips-1051767-01.php

来源:互联网 收集:自由互联 发布时间:2021-06-28
tips-1051767-01.php test.php title;$content = $in-content;require "./wechat.inc.php";$wechat = new WeChat(APPID, APPSECRET, TOKEN);$data = array( "touser" = "onxxxxxxxxxxxxxxxxxxxxxxxxxx", //接受人openId "template_id" = "hkrr6vqAmHGQiXw5
tips-1051767-01.php
test.php


 title;
$content = $in->content;


require "./wechat.inc.php";
$wechat = new WeChat(APPID, APPSECRET, TOKEN);


$data = array(
    "touser" => "onxxxxxxxxxxxxxxxxxxxxxxxxxx", //接受人openId
    "template_id" => "hkrr6vqAmHGQiXw5DR8Uu30fVAnjN7j47_rM29li5E0", //模板ID
    "url" => "https://xxxx.cybozu.com/k/m/74/",
    "data" => array(
        "title" => array(
            "value" => $title,
            "color" => "#173177"
        ),
        "content" => array(
            "value" => $content,
            "color" => "#173177"
        )
    )
);

$wechat->send_template_message(urldecode(json_encode($data)));

$status = array('title' => $title, 'content' => $content);
exit(json_encode($status));
?>
上一篇:多文件封装.txt
下一篇:tips-1051767-02.php
网友评论