ECSHOP 修改后台地址
发布:smiling 来源: PHP粉丝网 添加日期:2014-07-17 17:12:17 浏览: 评论:0
任何开源程序都存在系统漏洞和不安全的特点,因为使用的用户越来越多,加上源码开放等,更容易被发现漏洞,所有修改后台管理目录,就显得更有必要了,废话少说,下面就说一下如何修改ECSHOP的后台目录.
1.修改data/config.php $admin_dir = "admin";
修改成 $admin_dir = "新目录名";
2.修改admin/index.php //货号
require_once(ROOT_PATH . 'admin/includes/lib_goods.php'); 修改成
require_once(ROOT_PATH . $admin_dir.'/includes/lib_goods.php');
3.修改admin/database.php
require_once(ROOT_PATH . 'admin/includes/cls_sql_dump.php'); 修改成
require_once(ROOT_PATH . $admin_dir.'/includes/cls_sql_dump.php');
4.修改admin/get_password.php
- $reset_email = $ecs->url() . 'admin/get_password.php?act=reset_pwd&uid='.$admin_id.'&code='.$code;
- //修改成
- $reset_email = $ecs->url() . $admin_dir.'/get_password.php?act=reset_pwd&uid='.$admin_id.'&code='.$code;
5.修改admin/goods.php
require_once(ROOT_PATH . '/admin/includes/lib_goods.php'); 修改成
require_once(ROOT_PATH . $admin_dir.'/includes/lib_goods.php');
6.修改admin/check_file_priv.php
$dir[] = 'admin'; 修改成 $dir[] = $admin_dir;
7.修改admin/includes/init.php
- if (file_exists(ROOT_PATH . 'data/config.php')) {
- include(ROOT_PATH . 'data/config.php');
- 阅读会员限时特惠 7大会员特权立即尝鲜
- } else {
- include(ROOT_PATH . 'includes/config.php');
- }
- 修改成下面代码,并将代码移至“”注释之前。
- 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');
Tags: ECSHOP 修改后台地址
相关文章
- ·ECshop在线客服代码添加操作(2013-11-15)
- ·ecshop2.7.0商品分类显示数量(2013-11-15)
- ·Ecshop与jQuery冲突最简单的解决办法! (2013-11-15)
- ·ecshop不同的文章分类使用不同的模板的方法(2013-11-15)
- ·使用.htaccess来实现ecshop 301重定向的方法(伪静态可行)(2013-11-15)
- ·本机安装Ecshop时出现创建管理员帐号失败(2013-11-30)
- ·ecshop分类树显示所有分类的解决方法(2013-12-02)
- ·ecshop后台登录超时session过期的解决办法(2013-12-07)
- ·Ecshop系统添加免运费赠品后购物车变为收取运费解决办法(2014-01-06)
- ·将ecshop相对地址改成绝对地址的方法(2014-01-10)
- ·ECShop——回到顶部(2014-01-10)
- ·ECShop 模板修改(2014-01-10)
- ·Ecshop与jQuery冲突最简单的解决办法(2014-06-13)
- ·ecshop后台登录地址修改(2014-06-14)
- ·ecshop商城回收站的设计(2014-06-14)
- ·ecshop的标题$page_title之seo优化方案(2014-06-14)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)