只要將inc/inc_archives_functions.php
/** * 獲得縮略圖 * * @access public * @param string $litpic 縮略圖 * @param string $picname 圖片名稱 * @param string $isremote 是否遠(yuǎn)程 * @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("上傳的圖片格式錯(cuò)誤,請(qǐng)使用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_width,$cfg_ddimg_height); else @ImageResize($cfg_basedir.$fullUrl,$cfg_ddimg_width,$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_width,$cfg_ddimg_height); else @ImageResize($cfg_basedir.$litpic,$cfg_ddimg_width,$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_ddimg_width,$cfg_ddimg_height,$cfg_basedir.$litpic); else @ImageResize($oldpic,$cfg_ddimg_width,$cfg_ddimg_height,$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.全部替換掉就行了
版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: dede縮略圖變成/www/wwwroot/域名這樣的鏈接格式的解決辦法