圖片顯示不正常 求破
<?php $src="001.jpg"; $info=getimagesize($src); $type=?image_type_to_extension($info[2],false); $fun=?"imagecreatefrom".$type; $image?=?$fun($src); $image_thumb?=?imagecreatetruecolor(300,200); imagecopyresampled($image_thumb,$image,0,0,0,0,80,80,$info[0],$info[1]); imagedestroy($image); header("Content-type:".$info['mime']); $funs?=?"image{$type}"; $funs($image_thumb); $funs($image_thumb,"thumb_image.".$type); imagedestroy($image_thumb); ?>
這個問題怎么處理 求解答
2015-09-11
第一種
$image_thumb?=?imagecreatetruecolor(300,200);將值改為80,80
第二種
imagecopyresampled($image_thumb,$image,0,0,0,0,80,80,$info[0],$info[1]);將80和80改為 300,200
http://php.net/get/php_manual_zh.chm/from/a/mirror?這是php中文手冊 不懂的可以去下載來看