Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to modify the background address of ECSHOP 

Shulou Source: shulou.com Published: 2022-06-01 23:43:48 10月03日 Update

Editor to share with you how to modify the background address of ECSHOP , I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!

Any open source program has system vulnerabilities and insecure characteristics, because the use of more and more users, coupled with open source, it is easier to find vulnerabilities, all the changes to the background management directory, it is more necessary. To cut the crap, let's talk about how to modify the background directory of ECSHOP.

1. Modify data/config.php $admin_dir = "admin"

Change to $admin_dir = "new directory name"

two。 Modify admin/index.php / / item number

Require_once (ROOT_PATH. 'admin/includes/lib_goods.php'); modified to

Require_once (ROOT_PATH. $admin_dir.'/includes/lib_goods.php')

3. Modify admin/database.php

Require_once (ROOT_PATH. 'admin/includes/cls_sql_dump.php'); modified to

Require_once (ROOT_PATH. $admin_dir.'/includes/cls_sql_dump.php')

4. Modify admin/get_password.php

Reset_email = $ecs- > url (). 'The admin/get_password.php?act=reset_pwd&uid='.$admin_id.'&code='.$code; was modified to

Reset_email = $ecs- > url (). $admin_dir.'/get_password.php?act=reset_pwd&uid='.$admin_id.'&code='.$code

5. Modify admin/goods.php

Require_once (ROOT_PATH. '/ admin/includes/lib_goods.php'); modified to

Require_once (ROOT_PATH. $admin_dir.'/includes/lib_goods.php')

6. Modify admin/check_file_priv.php

$dir [] = 'admin'; is modified to

$dir [] = $admin_dir

7. Modify admin/includes/init.php

If (file_exists (ROOT_PATH. 'data/config.php')) {

Include (ROOT_PATH. 'data/config.php')

Read the members' time-limited special offer 7 members' privileges to taste fresh immediately.

} else {

Include (ROOT_PATH. 'includes/config.php')

}

Modify to the following code and move the code before the "" comment.

If (file_exists ('.. / data/config.php')) {

Include ('.. / data/config.php');} else {

Include ('.. / includes/config.php');}

Define ('ROOT_PATH', str_replace (' admin/includes/init.php','', str_replace ('\\','/', _ _ FILE__)); modified to

Define ('ROOT_PATH', str_replace ($admin_dir.'/includes/init.php',', str_replace ('\\','/', _ _ FILE__)

Require (ROOT_PATH. 'admin/includes/lib_main.php'); modified to

Require (ROOT_PATH. $admin_dir.'/includes/lib_main.php')

Require (ROOT_PATH. 'admin/includes/cls_exchange.php'); modified to

Require (ROOT_PATH. $admin_dir.'/includes/cls_exchange.php')

$smarty- > template_dir = ROOT_PATH. 'The admin/templates'; was modified to

$smarty- > template_dir = ROOT_PATH. $admin_dir.'/templates'

$admin_path = preg_replace ('/:\ dhammer ecs-,'', $ecs- > url ()). 'The admin'; was modified to

$admin_path = preg_replace ('/:\ dhammer ecs-,'', $ecs- > url ()). $admin_dir

8. Modify include/lib_main.php

Include_once (ROOT_PATH. 'admin/includes/lib_template.php'); modified to

Global $admin_dir

Include_once (ROOT_PATH. $admin_dir.'/includes/lib_template.php')

9. Modify include/cls_ecshop.php

$curr = strpos (PHP_SELF, 'admin/')! = = false?

Preg_replace ('/ (. *) (admin) (\ /?) (.) * / iTunes,'\ 1, dirname (PHP_SELF)): dirname (PHP_SELF); modified to

Global $admin_dir

$curr = strpos (PHP_SELF, $admin_dir.'/')! = false? Preg_replace ('/ (. *) ('. $admin_dir.') (\ /?) (.) * / iFlower,'\ 1, dirname (PHP_SELF)): dirname (PHP_SELF)

10. Modify / admin/picture_batch.php will

Include_once (ROOT_PATH. '/ admin/includes/lib_goods.php'); modified to

Include_once (ROOT_PATH. $admin_dir.'/includes/lib_goods.php')

11. Modify quotation.php

Include_once (ROOT_PATH. 'admin/includes/lib_main.php'); modified to

Global $admin_dir

Include_once (ROOT_PATH. $admin_dir.'/includes/lib_main.php')

The above is all the contents of the article "how to modify the background address of ECSHOP ". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Background directories articles addresses codes members content vulnerabilities security necessity less most nonsense more comments source code privileges features users directory names Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Xiaomi Shulou Technology Shulou Information macOS