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
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));
?>
