search
HomeCMS TutorialECShopECSHOP explains how to modify the background address

ECSHOP explains how to modify the background address

##Any open source program has system vulnerabilities and unsafe characteristics, because more and more users use it, and more and more people use it. Open source code makes it easier to discover vulnerabilities, so it becomes more necessary to modify the background management directory. Without further ado, let’s talk about how to modify the backend directory of ECSHOP. ECSHOP explains how to modify the background address

Recommended (free): ECShop

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

Modify to $admin_dir = "New directory name";

2. 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() . ' admin/get_password.php?act=reset_pwd&uid='.$admin_id.'&code='.$code; 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'); Modify to

require_once(ROOT_PATH . $admin_dir.'/includes/lib_goods.php');

6 .Modify admin/check_file_priv.php

$dir[] = 'admin'; 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 7 member special offers and try them now

} 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__))); 修改成

define('ROOT_PATH', str_replace($admin_dir.'/includes/init.php', '', str_replace('\\', '/', __FILE__))); 


require(ROOT_PATH . 'admin/includes/lib_main.php'); 修改成

require(ROOT_PATH . $admin_dir.'/includes/lib_main.php'); 


require(ROOT_PATH . 'admin/includes/cls_exchange.php'); 修改成

require(ROOT_PATH . $admin_dir.'/includes/cls_exchange.php'); 


$smarty->template_dir = ROOT_PATH . 'admin/templates'; 修改成

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


$admin_path = preg_replace('/:\d /', '', $ecs->url()) . 'admin'; 修改成

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

8.修改include/lib_main.php

include_once(ROOT_PATH . 'admin/includes/lib_template.php'); 修改成

global $admin_dir;

include_once(ROOT_PATH . $admin_dir.'/includes/lib_template.php'); 

9.修改include/cls_ecshop.php

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

preg_replace('/(.*)(admin)(\/?)(.)*/i', '\1', dirname(PHP_SELF)) : dirname(PHP_SELF); 修改成

global $admin_dir;

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

10.修改/admin/picture_batch.php 将

include_once(ROOT_PATH . '/admin/includes/lib_goods.php'); 修改成

include_once(ROOT_PATH .$admin_dir.'/includes/lib_goods.php'); 

11.修改quotation.php

include_once(ROOT_PATH . 'admin/includes/lib_main.php'); 修改成

global $admin_dir;

include_once(ROOT_PATH . $admin_dir.'/includes/lib_main.php');

The above is the detailed content of ECSHOP explains how to modify the background address. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:CSDN. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft