上传目录的修改

2016-07-07 15:06 来源:www.chinab4c.com 作者:ecshop专家

ECSHOP我安装在chs目录下

所以我在详细信息上传图片时,上传到了chs/images目录下

我想改为,上传到根目录的images下,即chs和image在同网站根目录下

FCK的config.php怎么修改啊

define('ROOT_PATH', preg_replace('/includes(.*)/i', '', str_replace('\\', '/', __FILE__)));

if (isset($_SERVER['PHP_SELF']))
{
define('PHP_SELF', $_SERVER['PHP_SELF']);
}
else
{
define('PHP_SELF', $_SERVER['SCRIPT_NAME']);
}

$root_path = preg_replace('/includes(.*)/i', '', PHP_SELF);

$Config['UserFilesPath'] = $root_path . 'images/upload/';

$Config['UserFilesAbsolutePath'] = ROOT_PATH . 'images/upload/' ;