Home  >  Article  >  Backend Development  >  dedecms后台验证码总提示错误的解决方法_PHP教程

dedecms后台验证码总提示错误的解决方法_PHP教程

WBOY
WBOYOriginal
2016-07-21 15:55:41871browse

直接用下面的代码,覆盖dede中的login.php即可

复制代码 代码如下:


require_once(dirname(__FILE__)."/../include/config_base.php");
require_once(dirname(__FILE__)."/../include/inc_userlogin.php");
if(empty($dopost)) $dopost="";
//--------------------------------
//登录检测
//--------------------------------
if($dopost=="login")
{
  if(empty($validate)) $validate=="";
  else $validate = strtolower($validate);

  if( empty($_SESSION["s_validate"]) ) $svali = "";
  else $svali = $_SESSION["s_validate"];

   $cuserLogin = new userLogin();
     if(!empty($userid)&&!empty($pwd))
     {
              $res = $cuserLogin->checkUser($userid,$pwd);
              //成功登录
              if($res==1){
                       $cuserLogin->keepUser();
                       if(!empty($gotopage)){
                               //header("location:$gotopage");
                               ShowMsg("成功登录,正在转向管理管理主页!",$gotopage);
                               exit();
                       }
                       else{
                               ShowMsg("成功登录,正在转向管理管理主页!","index.php");
                               //header("location:index.php");
                               exit();
                       }
              }
              else if($res==-1){
                      ShowMsg("你的用户名不存在!","");
              }
              else{
                      ShowMsg("你的密码错误!","");
              }
     }//     else{
            ShowMsg("用户和密码没填写完整!","");
     }

//}

?>



管理系统




   
    
  
   
    
  
   
    
  
   
    
  
   
    
  
   
    
  
   
    
  
dedecms后台验证码总提示错误的解决方法_PHP教程 
    
 

        
         
          
        
         
          
        
      
 
dedecms后台验证码总提示错误的解决方法_PHP教程  用户登录

        

        ">
        
        
           
            
          
           
            
            
          
           
            
            
          

           
            
          
        
 用户名:   
            
 密 码:    
            
  
                 
                

      




www.bkjia.comtruehttp://www.bkjia.com/PHPjc/318265.htmlTechArticle直接用下面的代码,覆盖dede中的login.php即可 复制代码 代码如下: ? require_once(dirname(__FILE__)."/../include/config_base.php"); require_once(dirname(__FILE__)."...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn