修改ecshop2.7.0后台路径
2009-09-29 11:08 来源:www.chinab4c.com 作者:ecshop专家
ecshop已经发展到2.7了。ecshop2.7不象其他版本,文件路径和文件调用机智都发生了变化,为了更好的处理ecshop后台路径,增加站的安全性.下面将总结,如何修改ecshop后台路径.
quotation.php
include_once(ROOT_PATH . 'user/includes/lib_main.php');
includes/lib_main.php
include_once(ROOT_PATH . 'user/includes/lib_template.php');
includes/lib_common.php
get_brands(){
include_once(ROOT_PATH . 'user/includes/lib_template.php');
}
data/config
$admin_dir = "user";
admin/picture_batch.php
include_once(ROOT_PATH . '/user/includes/lib_goods.php');
admin/index.php
require_once(ROOT_PATH . 'user/includes/lib_goods.php');
admin/goods.php
require_once(ROOT_PATH . '/user/includes/lib_goods.php');
admin/filecheck.php
checkfiles('user/', '\.php|\.htm|\.js|\.css|\xml');
admin/database.php
require_once(ROOT_PATH . 'user/includes/cls_sql_dump.php');
admin/check_file_priv.php
$dir[] = 'user';
$dir_subdir['temp'][] = 'temp/compiled/user';
$tpl_dirs[] = 'temp/compiled/user';
admin/includes/init.php
define('ROOT_PATH', str_replace('user/includes/init.php', '', str_replace('\\', '/', __FILE__)));
require(ROOT_PATH . 'user/includes/lib_main.php');
require(ROOT_PATH . 'user/includes/cls_exchange.php');
if (!file_exists('../temp/compiled/user'))
{
@mkdir('../temp/compiled/user', 0777);
@chmod('../temp/compiled/user', 0777);
}
$smarty->template_dir = ROOT_PATH . 'user/templates';
$smarty->compile_dir = ROOT_PATH . 'temp/compiled/user';
$admin_path = preg_replace('/:\d+/', '', $ecs->url()) . 'user';
api/client/includes/lib_api.php
require_once(ROOT_PATH.'user/includes/lib_main.php');
require_once(ROOT_PATH . 'user/includes/cls_exchange.php');
require_once(ROOT_PATH . 'user/includes/lib_goods.php');
includes/cls_ecshop.php
function url()
{
$curr = strpos(PHP_SELF, 'user/') !== false ?
preg_replace('/(.*)(user)(\/?)(.)*/i', '\1', dirname(PHP_SELF)) :
dirname(PHP_SELF);
$root = str_replace('\\', '/', $curr);
if (substr($root, -1) != '/')
{
$root .= '/';
}
return $this->get_domain() . $root;
}
来源:中国B4C电子商务
最近更新
常用插件
- ecshop红包修改成满多少减
我们在长期使用ecshop的时候,我们可以发现。ecshop的红包是一个非常强...
- ecshop购物车功能改进[插件
ecshop购物车功能改进[插件套餐]主要是我们最近开发工作和开发项目中。...
- ecshop降价通知登记插件
ecshop降价通知登记插件,主要是为了方便某些客户,对商品价格要求比...
- ecshop分类树中统计商品数
最近忙于开发其他项目,在不少朋友不断要求和催促的情况下,做出了该小...
- ecshop通用红包编码
很多时候,为了结合促销,必须扩展一下ecshop的红包功能。ecshop的红包...