一、效果图
二、代码示例
require DT_ROOT . '/api/a/wx.php'; $wx = new wx($db); $wx_small = $db->get_one("select * from {$DT_PRE}wx_small_user where username='{$username}'"); if ($wx_small['openid']) { $data = array( 'touser' => $wx_small['openid'], 'msgtype' => 'text', 'text' => array( 'content' => $content ) ); $url = 'https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token='.$wx->access_token; $result = $wx->curl_request($url, json_encode($data), 'post'); var_dump($result); }