2017-06-20 57 views
0

我只是從xfactorapp.com移動我的網站,任何新上傳的圖片都沒有縮略圖。圖像在服務器上,但不生成縮略圖。timthumb在網站遷移後無法工作

如何更改代碼以使縮略圖從新服務器可見?

function href_t`imthumb($file, $set = null, $xf = true) { 
if (!$set || !$xf) { 
    $timthumb = webpath_assets('/timthumb.php'); 
    $href = $timthumb . '?src=' . $file; 
    if (xcount($set) > 0) { 
     foreach ($set as $k => $v) { 
      $href .= '&' . $k . '=' . $v; 
     } 
    } 
    return $href; 
} else { 
    $param['w'] = 150; 
    $param['h'] = 150; 
    $param['zc'] = 0; 
    $param['q'] = 90; 
    if (DEV) { 
     $app = DEV_PREFIX . APP_VERSION; 
    } else { 
     $app = LIVE_PREFIX . APP_VERSION; 
    } 
    if (xcount($set) > 0) { 
     foreach ($set as $k => $v) { 
      $param[$k] = $v; 
     } 
     $file = '/' . $app . $file; 
     $protocol = 'http'; 
     if (isSSL()) { 
      $protocol = 'https'; 
     } 
return $protocol . '://thumb.xfactorapp.com/tt/' . implode('/', $param) . $file; 
    } 
} 
} 

至極給我:

<img class="img-responsive" alt="building" src="http://thumb.xfactorapp.com/tt/263/147/2/90/v3/uploads/_lifttec/cms/58529051881f8f0d87ab1401/5947fffeac28b_200-ATJ-Platforma-autoridicatoare-articulata.jpg"> 

我想更改代碼,以縮略圖與parnam性能但不上傳從thumb.xfactorapp.com

感謝

回答

0

只是改變$ xf從真到假$ xf = false。