首页 > CMS > Phpwind > 正文

phpwind 9.0解决QQ登陆,新浪微博登陆乱码

2024-08-30 19:07:00
字体:
来源:转载
供稿:网友

QQ转码 UTF-8 转GBK 

1.修改文件 src/extensions/com_qq_login/controller/IndexController.php  第28行添加如下代码:

$uinfo['nickname'] = iconv('UTF-8', 'GB2312',$uinfo['nickname']);

$uinfo['gender'] = iconv('UTF-8', 'GB2312',$uinfo['gender']);

2.修改 src/extensions/com_qq_login/service/dao/qq_oauth_dao.php 23行添加如下代码:

$nickname = iconv('UTF-8', 'GB2312',$nickname);

$gender = iconv('UTF-8', 'GB2312', $gender);

新浪微博转码 UTF-8 转GBK

1.修改文件 src/extensions/sweibologin/controller/IndexController.php  第35行后37行前添加如下代码:

$uinfo['name'] = iconv('UTF-8', 'GB2312', $uinfo['name']);

$uinfo['gender'] = iconv('UTF-8', 'GB2312', $uinfo['gender']);

2.修改文件 src/extensions/sweibologin/service/dao/sweibo_dao.php 14行 添加 如下代码:

$name = iconv('UTF-8', 'GB2312', $name);

//$gender = iconv('UTF-8', 'GB2312', $gender); 这个可以不用加

3、新浪绑定帐号报错问题 

修改 src/extensions/sweibologin/template/index_run.htm  65行,代码如下:

<</CODE>a rel="nofollow" href="/index.php?m=u&c=login&backurl=/index.php?m=app&app=com_weibo_login" class="btn btn_big">绑定现有帐号</</CODE>a>

修改为如下代码:

<</CODE>a rel="nofollow" href="/index.php?m=u&c=login&backurl=/index.php?m=app&app=sweibologin" class="btn btn_big">绑定现有帐号</</CODE>a>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选