discuz模板中心跟插件中心都找遍了,居然找不到时下很流行的拼单插件或者模板,对discuz越来越失望了
测试下问题补充!
<?php //获取微信access_token function getaccess_token(){ //appid与appsecret改成你自己的 $appid = '自己的appid'; $appsecret = '自己的appsecret'; $url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={$appid}&secret={$appsecret}"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0); $data = curl_exec($ch); curl_close($ch); $data = json_decode($data,true); return $data['access_token']; }