//声明CODE,获取小程序传过来的CODE $code = $_GET["code"]; //配置appid $appid = "请输入appid"; //配置appscret $secret = "请输入appscret"; //api接口 $api = "https://api.weixin.qq.com/sns/jscode2session?appid={$appid}&secret={$secret}&js_code={$code}&grant_type=authorization_code"; //获取GET请求 function httpGet($url){ $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_TIMEOUT, 500); curl_setopt($curl, CURLOPT_S
SK
Devil in My Mind.