Before on the internet to find a lot of changes to modify the phpcms background path, but all too cumbersome (personal feeling), finally found a relatively simple method of modification, here and everyone to share, hope to learn from each other.
The first step:
Create a folder at the root of the Web site, will be through this folder to enter the background login interface, so the folder name is not easy to guess the name of a person easily guessed. Here as a demonstration, I'll take it as a adminweb. Next, create a new file index.php in this folder, with the following contents:
Realpath (dirname(__file__). '/..') . '/'); include // Pc_base::creat_app (); $session _storage = ' session_ '. Pc_base:: Load_config (' System ', ' Session_storage ':: Load_sys_class ($session _storage); Session_Start (); $_session [' right_enter '] = 1; unset ($session _storage); Header (' Location:. /index.php?m=admin ');
Step Two:
Create a new file my_index.php in the Phpcms/modules/admin/folder with the following contents:
Exit (' No permission resources. ') ); class extends Index {publicfunction __construct () {if (empty( $_session[' Right_enter ']) {header(' location:./'); Exit :: __construct ();} Public function public_logout () {$_session[' right_enter '] = 0:: public_logout ();}}
This modification, only need two places to be able, do not divide so many steps, and the site backstage only through/adminweb, so it is not easy to find your backstage entrance, here need to note is, if you use/adminweb login, you press the original/admin.php
The above describes the Phpcms to modify the background path of the simple method, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.