(☞ຈل͜ຈ)☞ Главная  Статьи  Загрузчик Домой

Ok!
Ok!
71
function resi($src,$w,$h)
{
    $im_array = explode('/', $src);
    $folder = "/" . $im_array[1] . "/" . $im_array[2] . "/";
    $file = end($im_array);
    $root_path = "/home/d/dlmlru/shop_beta/public_html";

    if(!is_file( $root_path . "/images/products/" . 'N_'. $file)) {
        $inFile = $root_path . $src;
        $outFile = $folder . 'N_' . $file;
        $image = new Imagick($inFile);
        $image->thumbnailImage($w, $h);
        $image->writeImage($root_path . $outFile);
        return $folder . 'N_' . $file;
    }else{
        return $folder . 'N_' . $file;
    }
}


# example <img src="<?echo resi('/images/products/DSC08794_КМГ613_1600.jpg', 200, 133);?>" width="200"/>
resize, php12000Ресайз картинок php
1 2 3 4 5 6 7 8 9 10 11