当前位置:首页 > CMS教程 > PHPWind > 列表

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

发布:smiling 来源: PHP粉丝网  添加日期:2014-04-03 15:11:47 浏览: 评论:0 

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>

Tags: phpwind QQ登陆 新浪微博 乱码

分享到: