http://lankao.soft0371.com/  测试账号:heartrian 密码:a123456
cookie测试了一下,也正常啊http://lankao.soft0371.com/c.php?flag=1是服务器的问题吗?怎么解决呢?

解决方案 »

  1.   

    你的登陆验证是cookie验证的?  
      

  2.   

    打开php 出错提示. 将登录失败返回首页或者其他跳转的语句暂时注释.然后看看提示什么内容就知道了
      

  3.   

    这个其实说不清楚什么原因有可能是你的设置cookies有问题:setcookie("TestCookie","value");
    也有可能你输出有问题:echo $_COOKIE["TestCookie"];没看到源代码,所以具体原因搞不清楚
      

  4.   

    不是一般得查找数据库来验证码?  cookie太容易伪造了。不安全。
      

  5.   


    if(isset($action) && $action == 'login') {

    $num = $lankao->getuserinfo($username,$password);

    if($num == 1){
    login_setcookie($username,$username,$life=0);

    }
    echo $num;exit;
    }登陆不了,本地测试可以,不知道怎么回事??
      

  6.   


     function login_setcookie($username, $user_id,$password, $life=0){
     
    c_setcookie('auth', authcode("$username/$user_id/$password", 'ENCODE', AUTHKEY), $life);

    c_setcookie('auth_time', $life, $life);
    c_setcookie('user', $username, $life);
    }function logout_setcookie(){
    c_setcookie('auth', '', -365*86400);
    c_setcookie('auth_time', '', -365*86400);
    c_setcookie('user', '', -365*86400);
    c_setcookie('password', '', -365*86400);
    return 1;
    }
    我的cookie是加密过得,似乎好像写入不了,怎么回事???