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

$scope = 'snsapi_base';

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

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