如何修改phpcms v9默認後臺登陸地址教程:javascript
修改 /phpcms/modules/admin/classes/admin.class.php。php
final public function check_admin() { if(ROUTE_M =='admin' && ROUTE_C =='index' && in_array(ROUTE_A, array('login', 'public_card'))) {
改成:java
final public function check_admin() { if(ROUTE_M =='admin' && ROUTE_C =='index' && in_array(ROUTE_A, array('新登陸函數名', 'public_card'))) { if(!isset($_SESSION['userid']) || !isset($_SESSION['roleid']) || !$_SESSION['userid'] || !$_SESSION['roleid']) showmessage(L('admin_login'),'m=admin&c=index&a=login');
改成(這塊會跳轉到網站首頁,不知道準確地址永遠打不開登陸頁面):函數
if(!isset($_SESSION['userid']) || !isset($_SESSION['roleid']) || !$_SESSION['userid'] || !$_SESSION['roleid']) showmessage(L('admin_login'),APP_PATH); final public function check_priv() { if(ROUTE_M =='admin' && ROUTE_C =='index' && in_array(ROUTE_A, array('login', 'init', 'public_card'))) return true;
改成:post
final public function check_priv() { if(ROUTE_M =='admin' && ROUTE_C =='index' && in_array(ROUTE_A, array('新登陸函數名', 'init', 'public_card'))) return true;
修改 /phpcms/modules/admin/templates/login.tpl.php網站
<form action="index.php?m=admin&c=index&a=login&dosubmit=1" method="post" name="myform">改成:
<form action="index.php?m=admin&c=index&a=新登陸函數名&dosubmit=1" method="post" name="myform">
這樣就實現了修改phpcms v9默認後臺地址,例如http://www.phpcms8.com/xxx.php(xxx.php爲修改後文件名)。spa