In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to reset the background URL by phpcms? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
1. Modify the admin.php file name, and change the jump address to write the full path. The specific modifications are as follows:
Change the "index.php?m=admin" in the code to a specific URL, such as https://www.php.cn/myadmin/index.php.
2. Modify / phpcms/modules/admin/index.php to change public function login to the address you want:
Find "? m=admin&c=index&a=login" for batch replacement.
3. Modify / phpcms/modules/admin/classes/admin.class.php
3.1 the code will be as follows:
Final public function check_admin () {if (ROUTE_M = = 'admin' & & ROUTE_C = =' index' & & in_array (ROUTE_A, array ('login',' public_card') {
Modified to:
Final public function check_admin () {if (ROUTE_M = = 'admin' & & ROUTE_C = =' index' & & in_array (ROUTE_A, array ('new login function name', 'public_card') {
3.2 translate the code
If (! isset ($_ SESSION ['userid']) | |! isset ($_ SESSION [' roleid']) | |! $_ SESSION ['userid'] | |! $_ SESSION [' roleid']) showmessage (L ('admin_login'),' masked adminstration centering indexation
Modify to
If (! isset ($_ SESSION ['userid']) | |! isset ($_ SESSION [' roleid']) | |! $_ SESSION ['userid'] | |! $_ SESSION [' roleid']) showmessage (L ('admin_login'), APP_PATH)
Note: this modification avoids jumping to the home page of the site, because you can never open the login page if you don't know the exact address.
3.3 put the code
Final public function check_priv () {if (ROUTE_M = = 'admin' & & ROUTE_C = =' index' & & in_array (ROUTE_A, array ('login',' init', 'public_card') return true
Change to
Final public function check_priv () {if (ROUTE_M = = 'admin' & & ROUTE_C = =' index' & & in_array (ROUTE_A, array ('new login function name', 'init',' public_card') return true
4. Modify / phpcms/modules/admin/templates/login.tpl.php
Put the code
Modified to:
5. Search all files under / phpcms/modules/admin and change a=login to a = new login function name.
This makes it possible to change the default background address of phpcms v9, such as https://www.php.cn/myadmin/index.php (myadmin/index.php is the modified file name).
Thank you for reading! After reading the above, do you have a general idea of how phpcms resets the background URL? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.