小蜜锋 - 云代码空间
—— 技术宅拯救世界!
$url = "https://graph.qq.com/user/get_user_info?access_token={$accessToken}&oauth_consumer_key={$appKey}&openid={$openId}&format=json"; $pos = strpos($json,'}'); $json=substr($json, 0, $pos + 1); //去掉}后面的结束字符 $userInfo = json_decode($json);