<?php //功能:生成縮略圖 class CreatMiniature { //公共變量 var $srcFile = ""; //原圖 var $echoType; //輸出圖片類型,link--不保存為文件;file--保存為文件 var $im = ""; //臨時(shí)變量 var $srcW = ""; //原圖寬 var $srcH = ""; //原圖高 //設(shè)置變量及初始化 function SetVar($srcFile, $echoType) { if (!file_exists($srcFile)) { echo '源圖片文件不存在!'; exit(); } $this->srcFile = $srcFile; $this->echoType = $echoType; $info = ""; $data = GetImageSize($this->srcFile, $info); switch ($data[2]) { case 1: if (!function_exists("imagecreatefromgif")) { echo "你的GD庫(kù)不能使用GIF格式的圖片,請(qǐng)使用Jpeg或PNG格式!返回"; exit(); }
??? ?? ?? (??? ?? ??: gif, jpeg, png ? bmp)
* @author ruxing.li
* @param string $src ?? ??? ??
* @param int $width ??? ?? ( ?? ?? ??? ??? ?? ?? ??)
* @param int $width ??? ??(??? ??? ?? ?? ?? ??? ??)
* @param string $filename ?? ??(???? ?? ?? ????? ?? ??)
* @return ??
? ???? ?? ???? ???? ????? ?? ???? ????? ????????. ?????? ???? ?? ??????! ? ???? ?? ???? ?? ?????? ?????. ??? ???? ???? ??? ????. ??? ??? ?? ??? ?? ??? ???? ????! ??? ?? ?? ??? ???? ????? ????. ???: admin@php.cn
?? ??

29 Jul 2016
??? ??: ???? ?? ???? PHP ??: ??: ??? ??? ?? ??? ????? ???? ????? ?? ? ????. ???? ???? ??? ?? ?? ??? ????. <?php $config = array(); $config['path'] = "./"; $config['t_width'] = 120; $config['ignore'] = array("",".","..");


??? ??

??? ?? ????? PHP ?????
??? ?? ????? PHP ?????

50?? ??? ??? PHP ???? ??
??? PHP ????, ??? ????? ??? ???? ?????

??? ???? ?? ?? PHP ?????
??? ???? ?? ?? PHP ?????
