如何修改ecshop图片的路径

二级域名的图片怎么使用顶级域名的图片,怎么修改路径... 二级域名的图片怎么使用顶级域名的图片,怎么修改路径 展开
 我来答
Ms帽儿
推荐于2016-11-06 · TA获得超过1092个赞
知道大有可为答主
回答量:1223
采纳率:0%
帮助的人:1684万
展开全部
1.修改fckeditor/editor/filemanager/connectors/php/config.php
1)设置上传路径
$Config['Enabled'] = true ;
$Config['UserFilesPath'] = ‘/upfiles/’ ;
$Config['UserFilesAbsolutePath'] = $_SERVER['DOCUMENT_ROOT'].$Config['UserFilesPath'];

2)按时间自动生成目录 (如/upfiles/image/2009/06/202112272751.jpg)
$Config['AllowedExtensions']['File'] = array(‘7z’, ‘aiff’, ‘asf’, ‘avi’, ‘bmp’, ‘csv’,
‘doc’, ‘fla’, ‘flv’, ‘gif’, ‘gz’, ‘gzip’,
‘jpeg’, ‘jpg’, ‘mid’, ‘mov’, ‘mp3′, ‘mp4′,
‘mpc’, ‘mpeg’, ‘mpg’, ‘ods’, ‘odt’, ‘pdf’,
‘png’, ‘ppt’, ‘pxd’, ‘qt’, ‘ram’, ‘rar’,
‘rm’, ‘rmi’, ‘rmvb’, ‘rtf’, ’sdc’, ’sitd’,
’swf’, ’sxc’, ’sxw’, ‘tar’, ‘tgz’, ‘tif’,
‘tiff’, ‘txt’, ‘vsd’, ‘wav’, ‘wma’, ‘wmv’,
‘xls’, ‘xml’, ‘zip’) ;
$Config['DeniedExtensions']['File'] = array() ;
$cns_tmp_time= date(“Y”,time()).”/”.date(“m”, time()) .”/”;
$Config['FileTypesPath']['File'] = $Config['UserFilesPath'] . ‘file/’ ; //这里什么也不添加
$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == ”) ? ” : $Config['UserFilesAbsolutePath'].’file/’ ; //这里什么也不添加
$Config['QuickUploadPath']['File'] = $Config['UserFilesPath'] .’file/’ .$cns_tmp_time ;
$Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'].’file/’ .$cns_tmp_time ;

$Config['AllowedExtensions']['Image'] = array(‘bmp’,'gif’,'jpeg’,'jpg’,'png’) ;
$Config['DeniedExtensions']['Image'] = array() ;
$Config['FileTypesPath']['Image'] = $Config['UserFilesPath'] . ‘image/’ ;
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == ”) ? ” : $Config['UserFilesAbsolutePath'].’image/’ ;
$Config['QuickUploadPath']['Image'] = $Config['UserFilesPath'] .’image/’ .$cns_tmp_time;
$Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'].’image/’ .$cns_tmp_time ;

$Config['AllowedExtensions']['Flash'] = array(’swf’,'flv’) ;
$Config['DeniedExtensions']['Flash'] = array() ;
$Config['FileTypesPath']['Flash'] = $Config['UserFilesPath'] . ‘flash/’ ;
$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == ”) ? ” : $Config['UserFilesAbsolutePath'].’flash/’ ;
$Config['QuickUploadPath']['Flash'] = $Config['UserFilesPath'] .’flash/’ .$cns_tmp_time;
$Config['QuickUploadAbsolutePath']['Flash']= $Config['UserFilesAbsolutePath'].’flash/’ .$cns_tmp_time ;

$Config['AllowedExtensions']['Media'] = array(‘aiff’, ‘asf’, ‘avi’, ‘bmp’, ‘fla’,
‘flv’, ‘gif’, ‘jpeg’, ‘jpg’, ‘mid’,
‘mov’, ‘mp3′, ‘mp4′, ‘mpc’, ‘mpeg’,
‘mpg’, ‘png’, ‘qt’, ‘ram’, ‘rm’, ‘rmi’,
‘rmvb’, ’swf’, ‘tif’, ‘tiff’, ‘wav’,
‘wma’, ‘wmv’) ;
$Config['DeniedExtensions']['Media'] = array() ;
$Config['FileTypesPath']['Media'] = $Config['UserFilesPath'] . ‘media/’ ;
$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == ”) ? ” : $Config['UserFilesAbsolutePath'].’media/’ ;
$Config['QuickUploadPath']['Media'] = $Config['UserFilesPath'] .’media/’ .$cns_tmp_time;
$Config['QuickUploadAbsolutePath']['Media']= $Config['UserFilesAbsolutePath'].’media/’ .$cns_tmp_time ;

2.修改fckeditor/editor/filemanager/connectors/php/commands.php
1)修改自动生成随机文件名
a)添加函数
function GetRandID($prefix) {
//第一步:初始化种子
//microtime(); 是个数组
$seedstr =split(” “,microtime(),5);
$seed =$seedstr[0]*10000;
//第二步:使用种子初始化随机数发生器
srand($seed);
//第三步:生成指定范围内的随机数
$random =rand(1,10000);
$filename = date(“dHis”, time()).$random.’.’.$prefix;
return $filename;
}

b)应用函数
在函数function FileUpload( $resourceType, $currentFolder, $sCommand ) 中的if ( isset( $Config['SecureImageUploads'] ) ) 上面一行添加
$sOriginalFileName = $sFileName = GetRandID($sExtension);
ecmoban模板堂
2015-01-21 · TA获得超过770个赞
知道大有可为答主
回答量:2259
采纳率:66%
帮助的人:878万
展开全部
一般来说 路径用 ../images 路径指向即可
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
ecshop开发中心
2015-01-21 · TA获得超过577个赞
知道大有可为答主
回答量:2299
采纳率:0%
帮助的人:555万
展开全部
你可以找专业的技术人员帮你一下
追问
。。。。。这是不是售后的服务范围了
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式