How to implement the login-free interface of DreamWeaver cms?
This article introduces the login-free interface of DreamWeaver cms for dedev5.
The implementation steps are as follows:
Cancel the login prompt that appears when DEDE is not logged in Automatically log in to DEDE Modify one DEDE code, It is config.php in the DEDE program administrator directory. The default path is dede/config.php. The code is as follows: //Check user login status The code is as follows:$cuserLogin = new userLogin(); if($cuserLogin->getUserID()==-1) { header("location:login.php?gotopage=".urlencode($dedeNowurl)); exit(); }
//检验用户登录状态
$cuserLogin = new userLogin(); if($cuserLogin->getUserID()==-1) { if($my_u != ''){ $res = $cuserLogin->checkUser($my_u, $my_p); if($res==1) $cuserLogin->keepUser(); } if($cuserLogin->getUserID()==-1) { header("location:login.php?gotopage=".urlencode($dedeNowurl)); exit(); } }
The above is the detailed content of How to implement the login-free interface of Dreamweaver CMS. For more information, please follow other related articles on the PHP Chinese website!