|
@@ -36,7 +36,7 @@ class weixin_public
|
|
|
public function redirectWithCode()
|
|
public function redirectWithCode()
|
|
|
{
|
|
{
|
|
|
$url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=".$this->appid
|
|
$url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=".$this->appid
|
|
|
- ."&redirect_uri=".$this->uri
|
|
|
|
|
|
|
+ ."&redirect_uri=".urlencode($this->uri)
|
|
|
."&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
|
|
."&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
|
|
|
|
|
|
|
|
//header('Location: '.$url);
|
|
//header('Location: '.$url);
|