functionwx_get_token(){ $token=S('access_token'); if(!$token){ $res=file_get_contents('https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.'wx06907b4646541e4b'.'&secret='.'a504bfec60acddd31862e6d8a10ef671'); $res=json_decode($res,true);