首页 > 其他 > 详细

dedecms开启多站点

时间:2015-03-09 16:06:52      阅读:318      评论:0      收藏:0      [点我收藏+]

dedecms开启多站点后,填写域名才能正确的地址

if ( ! function_exists(‘GetFileUrl‘))
{
    function GetFileUrl($aid,$typeid,$timetag,$title,$ismake=0,$rank=0,$namerule=‘‘,$typedir=‘‘,
    $money=0, $filename=‘‘,$moresite=0,$siteurl=‘‘,$sitepath=‘‘)
    {
        $articleUrl = GetFileName($aid,$typeid,$timetag,$title,$ismake,$rank,$namerule,$typedir,$money,$filename);
        $sitepath = MfTypedir($sitepath);

        //是否强制使用绝对网址
        if($GLOBALS[‘cfg_multi_site‘]==‘Y‘)
        {
            if($siteurl==‘‘)
            {
                $siteurl = $GLOBALS[‘cfg_basehost‘];
            }
            if($moresite==1)
            {
                $articleUrl = preg_replace("#^".$sitepath.‘#‘, ‘‘, $articleUrl);
            }
            if(!preg_match("/http:/", $articleUrl))
            {
                $articleUrl = $siteurl.$articleUrl;
            }
        }

        return $articleUrl;

 

dedecms开启多站点

原文:http://www.cnblogs.com/agang-php/p/4323631.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!