コード例 #1
0
function getThumb($image, $thumbId = 0, $isCheck = false)
{
    $upConf = C('upload', 'thumb_size');
    if (!isset($upConf[$thumbId])) {
        $thumbId = 0;
    }
    if (strpos($image, 'yun/') === 0) {
        return $image . $upConf[$thumbId]['t'];
    } else {
        T('image/thumb');
        return thumb::init($image, $upConf[$thumbId]['w'], $upConf[$thumbId]['h'], $isCheck);
    }
}