/*引入文件Easyphpthumbnail.class.php
引用地址:http://www.itdaodan.com/article-detail-id-252.html
*/
class Thumb{protected $thumblocation = 'Attachment/thumbs/' ;protected $size_icon = array ('72' => '72', '96' =>'96' , '144'=> '144' );protected $size_logo = array ('480' => '800', '720' =>'1280' , '800'=> '1280' ,'1080' => '1920'); /*** @todo 缩略图* @param array $image* @param array $size* @return boolean*/ public function thumbnail ($image ,$size){ if (empty ($image ) || empty ($size )){ return false ; } $image = (array)$image; $size = (array)$size; $thumb = new ThinkEasyphpthumbnail ; $thumb -> Thumblocation = $this->thumblocation ; foreach ($image as $k=>$v){ foreach ($size as $key=>$val){ $thumb -> Thumbprefix = $key.'_' ; $thumb -> Thumbheight = $val; $thumb -> Thumbwidth = $key; $thumb -> Createthumb ($v,'file' ); } } return true ; }}