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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[不是BUG] XML解析错误:废弃 document 元素之后的内容

[复制链接]
a0z0 发表于 2009-7-6 14:34:51 | 显示全部楼层 |阅读模式
本帖最后由 a0z0 于 2009-7-28 13:33 编辑

我想加个参数。下面的代码
upgame.html.php

ajaxresponse('checkusername', 'op=checkusername&sortid='+categories+'&username=' + (is_ie && document.charset == 'utf-8' ? encodeURIComponent(userName) : userName));             //这里调用的。

do_upgame.php

$username = trim($_GET['username']);
        $sortid = $_GET['sortid'];
        if(empty($username)) {
                showmessage('user_name_is_not_legitimate');
        }
       
        @include_once (S_ROOT.'./uc_client/client.php');
        $ucresult = uc_user_checkgamename($username,$sortid);    这里接收的值。

client.php

function uc_user_checkgamename($username,$sortid) {
        return call_user_func(UC_API_FUNC, 'user', 'check_gamename', array('username'=>$username, 'sortid'=>$sortid));

contror/user.php
        function _check_gamename($username,$sortid) {
                $username = addslashes(trim(stripslashes($username)));
                if(!$_ENV['user']->check_username($username)) {
                        return UC_USER_CHECK_USERNAME_FAILED;
                } elseif(!$_ENV['user']->check_gamenamecensor($username)) {
                        return UC_USER_USERNAME_BADWORD;
                } elseif($_ENV['user']->check_gamenameexists($username,$sortid)) {
                        return UC_USER_USERNAME_EXISTS;
                }
                return 1;
        }
       
}

model/user.php

function check_gamenameexists($username,$sortid) {
                $data = $this->db->result_first("SELECT Account FROM supe_game  WHERE Account='$username' and categories=".$sortid);
                return $data;
        }

问题已经解决
幸福摩天轮 发表于 2009-7-7 09:28:51 | 显示全部楼层
check_gamenameexists 不是只用的一次,把所有出现这个函数的地方都要加上第二个参数
回复

使用道具 举报

 楼主| a0z0 发表于 2009-7-7 11:20:32 | 显示全部楼层
本帖最后由 a0z0 于 2009-7-7 11:41 编辑

你可不可以说得再详细点。谢谢
check_gamenameexists这个函数我都加了,但是还是没有传过去。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-28 14:16 , Processed in 0.413938 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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