<?php
header('content-type:text/html;charset=utf-8');
define("ViaGe_Weixin_Access_Token",str_replace('\\','/',dirname(__FILE__)));//根目录物理路径
//配置APPID、APPSECRET
$appid = "APPID";
$secret = "APPSECRET";
$qrcode=_qrcode("1",$appid,$secret,"258");
echo '<img src="./'.$qrcode['img'].'" >';
//获取access_token
function access_token($appid,$secret){
$access_token = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$appid&secret=$secret";
$access_path = ViaGe_Weixin_Access_Token."/" . $appid . ".json";
$file = file_get_contents($access_path, true);
$access = json_decode($file, true);
if (time() > $access['expires']) {
$get_access_token = Roboa_Url($access_token);
$get_access_token = json_decode($get_acce
自定义小程序带参数获取方形和圆形二维码
最新推荐文章于 2024-05-19 17:22:02 发布