<?php
include "wechat.class.php";
include 'errCode.php';

$scope = 'snsapi_base';

$opt = array(
	'appsecret'=>'960c1a5e0b8132392c095069e2f3',//填写高级调用功能的密钥
	'appid'=>'wx712a29b9901e5'	//填写高级调用功能的appid
);

$we = new Wechat($opt);
$auth = $we->checkAuth();
$arr = $we->getOauthAccessToken();
//echo $arr["access_token"];
echo 'openid='.$arr["openid"];
exit;
?>