data 改为其他名字时,我们相对应地也要改动相关的文件配置
1,比如我们把data改为lalala,
2,修改DEDEDATA目录的配置常量 找到系统目录下/include/common.inc.php文件,修改DEDEDATA常量为你的系统目录。
define('DEDEDATA', DEDEROOT.'/lalala');
3.配置tplcache缓存文件目录进入系统后台,在配置中修改tplcache目录为你想对目录。
4,首页index.php文件也需要修改
5,DEDECMS默认生成的rss地图以及网站地图等都是生成在DATA的文件夹中,改为生成到根目录
修改根目录下你的管理员文件夹(默认是dede)下的makehtml_map.php文件
if($dopost=="site")
{
$murl = $cfg_cmspath."/data/sitemap.html";
$tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm";
}
else
{
$murl = $cfg_cmspath."/data/rssmap.html";
$tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/rssmap.htm";
}
修改根目录下include下面的arc.rssview.class.php
function MakeRss($isremote=0)
{
global $cfg_remote_site;
$murl = $GLOBALS['cfg_cmspath']."/data/rss/".$this->TypeID.".xml";
$mfile = $GLOBALS['cfg_basedir'].$murl;
$this->dtp->SaveTo($mfile);
//如果启用远程站点则上传
if($cfg_remote_site=='Y' && $isremote == 1)
{
//分析远程文件路径
$remotefile = $murl;
$localfile = '..'.$remotefile;
$remotedir = preg_replace('/[^\/]*\.xml/', '',$remotefile);
//不相等则说明已经切换目录则可以创建镜像
$this->ftp->rmkdir($remotedir);
$this->ftp->upload($localfile, $remotefile, 'acii');
}
return $murl;
}
修改根目录下include下的sitemap.class.php
if($maptype=="site")
{
$typelink = GetTypeUrl($row->id,MfTypedir($row->typedir),$row->isdefault,$row->defaultname,$row->ispart,$row->namerule2,$row->moresite,$row->siteurl,$row->sitepath);
}
else
{
$typelink = $GLOBALS['cfg_cmsurl']."/data/rss/".$row->id.".xml";
}
if($maptype=="site")
{
$typelink = GetTypeUrl($row->id,MfTypedir($row->typedir),$row->isdefault,$row->defaultname,$row->ispart,$row->namerule2,$row->moresite,$row->siteurl,$row->sitepath);
}
else
{
$typelink = $GLOBALS['cfg_cmsurl']."/data/rss/".$row->id.".xml";
}