Dedecms background verification code total prompt error solution _ PHP Tutorial

Source: Internet
Author: User
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


























 








User logon





The pipeline code is as follows :? Require_once (dirname (_ FILE _). "/../include/config_base.php"); require_once (dirname (_ FILE __)."...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.