The dedecms background verification code always prompts an error solution. Directly use the following code to overwrite login. php in dede to copy the code as follows :? Require_once (dirname (_ FILE _)... includeconfig_base.php); require_once (dirname (_ FILE _). use the following code to overwrite login. php in dede.
The code is as follows:
Require_once (dirname (_ FILE _). "/../include/config_base.php ");
Require_once (dirname (_ FILE _). "/../include/inc_userlogin.php ");
If (empty ($ dopost) $ dopost = "";
//--------------------------------
// Logon detection
//--------------------------------
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 );
// Login successful
If ($ res = 1 ){
$ CuserLogin-> keepUser ();
If (! Empty ($ gotopage )){
// Header ("location: $ gotopage ");
ShowMsg ("successfully logged on, switching to the management homepage! ", $ Gotopage );
Exit ();
}
Else {
ShowMsg ("successfully logged on, switching to the management homepage! "," Index. php ");
// Header ("location: index. php ");
Exit ();
}
}
Else if ($ res =-1 ){
ShowMsg ("Your user name does not exist! ","");
}
Else {
ShowMsg ("your password is incorrect! ","");
}
} // <-The password is not blank
Else {
ShowMsg ("the user and password are not complete! ","");
}
// <-Verify the user
}
?>
Management System
The pipeline code is as follows :? Require_once (dirname (_ FILE _). "/../include/config_base.php"); require_once (dirname (_ FILE __)."...