dede织梦data改为其他名字

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";
            }






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值