dedeCMS缩略图变成wwwwwwroot这样的链接格式的解决教程

dedeCMS缩略图变成wwwwwwroot这样的链接格式的解决教程,第1张

概述只要将inc/inc_archives_functions.php 查看源码打印代码帮助/** * 获得缩略图 * * @access public * @param string $litpic 缩略图 * @param string $picname 图片名称 * @param string $isremote 是否远程 * @return string */function GetDDImage($litpic

只要将inc/inc_archives_functions.PHP

查看源码打印代码帮助/** *  获得缩略图 * * @access    public * @param     string  $litpic  缩略图 * @param     string  $picname  图片名称 * @param     string  $isremote  是否远程 * @return    string */function GetDDImage($litpic,$picname,$isremote){    global $cuserLogin,$cfg_ddimg_wIDth,$cfg_ddimg_height,$cfg_basedir,$ddcfg_image_dir,$cfg_addon_savetype;    $ntime = time();    if( ($litpic != 'none' || $litpic != 'ddfirst') &&     !empty($_fileS[$litpic]['tmp_name']) && is_uploaded_file($_fileS[$litpic]['tmp_name']))    {        //如果用户自行上传缩略图        $istype = 0;        $sparr = Array("image/pjpeg","image/jpeg","image/gif","image/png");        $_fileS[$litpic]['type'] = strtolower(trim($_fileS[$litpic]['type']));        if(!in_array($_fileS[$litpic]['type'],$sparr))        {            ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!","-1");            exit();        }        $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype,$ntime);        CreateDir($savepath);        $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis',$ntime).$cuserLogin->getUserID().mt_rand(1000,9999));        if(strtolower($_fileS[$litpic]['type']) == "image/gif")        {            $fullUrl = $fullUrl.".gif";        }        else if(strtolower($_fileS[$litpic]['type']) == "image/png")        {            $fullUrl = $fullUrl.".png";        }        else        {            $fullUrl = $fullUrl.".jpg";        }        @move_uploaded_file($_fileS[$litpic]['tmp_name'],$cfg_basedir.$fullUrl);        $litpic = $fullUrl;        if($GLOBALS['cfg_ddimg_full']=='Y') @ImageResiZenew($cfg_basedir.$fullUrl,$cfg_ddimg_height);        else @ImageResize($cfg_basedir.$fullUrl,$cfg_ddimg_height);                $img = $cfg_basedir.$litpic;    }    else    {        $picname = trim($picname);        if($isremote==1 && preg_match("#^http://#i",$picname))        {            $litpic = $picname;            $ddinfos = GetRemoteImage($litpic,$cuserLogin->getUserID());            if(!is_array($ddinfos))            {                $litpic = '';            }            else            {                $litpic = $ddinfos[0];                if($ddinfos[1] > $cfg_ddimg_wIDth || $ddinfos[2] > $cfg_ddimg_height)                {                    if($GLOBALS['cfg_ddimg_full']=='Y') @ImageResiZenew($cfg_basedir.$litpic,$cfg_ddimg_height);                    else @ImageResize($cfg_basedir.$litpic,$cfg_ddimg_height);                }            }        }        else        {            if($litpic=='ddfirst' && !preg_match("#^http://#i",$picname))            {                $oldpic = $cfg_basedir.$picname;                $litpic = str_replace('.','-lp.',$picname);                if($GLOBALS['cfg_ddimg_full']=='Y') @ImageResiZenew($oldpic,$cfg_basedir.$litpic);                else@ImageResize($oldpic,$cfg_basedir.$litpic);                if(!is_file($cfg_basedir.$litpic)) $litpic = $oldpic;            }            else            {                $litpic = $picname;                return $litpic;            }        }    }    if($litpic=='litpic' || $litpic=='ddfirst') $litpic = '';    return $litpic;}

 

 

里面的$cfg_basedir.全部替换掉就行了

  总结

以上是内存溢出为你收集整理的dedeCMS缩略图变成/www/wwwroot/这样的链接格式解决教程全部内容,希望文章能够帮你解决dedeCMS缩略图变成/www/wwwroot/这样的链接格式的解决教程所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/1024105.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存