按照老师的代码发现图片错误 什么原因啊
<?php
//open picture
$src = "001.jpg";
//get picture info
$info = getimagesize($src);
//get pirture type for num
$type = image_type_to_extension($info[2],false);
//build picture in stronge
$fun = "imagecreatefrom{$type}";
//copy
$image = $fun($src);//as imagecreatefromjpeg($src);
//option picture
//create width height px pricture
$image_thumb = imagecreatetruecolor(300, 200);
//copy after pirture in px priture
imagecopyresampled($image_thumb, $image, 0, 0, 0, 0, 300, 200, $info[0], $info[1]);
//destroy image
imagedestroy($image);
//show picture in borwer
ob_clean();
header("Content-type:".$info['mime']);
$funs = 'image{$type}';
$funs{$image_thumb};
//destroy
imagedestroy($image_thumb);
?>