Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[求助] 同步登录问题,大哥解释下

[复制链接]
一品带刀 发表于 2010-8-12 21:24:43 | 显示全部楼层 |阅读模式
本帖最后由 一品带刀 于 2010-8-12 21:29 编辑

function onsynlogin() {   
        $this->init_input();   
        $uid = $this->input('uid');   

这里的$uid 来自于这个函数
function input($k) {
                return isset($this->input[$k]) ? (is_array($this->input[$k]) ? $this->input[$k] : trim($this->input[$k])) : NULL;
        }
但是我觉得$this->input[$k]是NULL,没有值

这个UID是如何传递过来的
 楼主| 一品带刀 发表于 2010-8-12 22:16:58 | 显示全部楼层
哪位大哥知道,解释下
回复

使用道具 举报

 楼主| 一品带刀 发表于 2010-8-13 13:01:42 | 显示全部楼层
本帖最后由 一品带刀 于 2010-8-13 13:04 编辑

已经解决了,我看错了,这个函数function onsynlogin() {   
        $this->init_input();   
        $uid = $this->input('uid');   
应该在UC_SERVER下看的,我还在看UC_CLIENDT下看
抱歉
在UC_SERVER下就有了这个函数
function init_input($getagent = '') {
                $input = getgpc('input', 'R');
                if($input) {
                        $input = $this->authcode($input, 'DECODE', $this->app['authkey']);
                        parse_str($input, $this->input);
                        $this->input = daddslashes($this->input, 1, TRUE);
                        $agent = $getagent ? $getagent : $this->input['agent'];

                        if(($getagent && $getagent != $this->input['agent']) || (!$getagent && md5($_SERVER['HTTP_USER_AGENT']) != $agent)) {
                                exit('Access denied for agent changed');
                        } elseif($this->time - $this->input('time') > 3600) {
                                exit('Authorization has expired');
                        }
                }
                if(empty($this->input)) {
                        exit('Invalid input');
                }
        }
来初始化INPUT
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-10-7 07:26 , Processed in 0.117486 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表