怎么我的输出的都是乱码??
怎么回事啊 求大神支招
<?php //open img $src = 'images/newoffice.jpg'; $info = getimagesize($src); //echo '<br />'; //print_r($info); $type = image_type_to_extension($info[2],false); //print_r($type); $func = "imagecreatefrom{$type}"; $image = $func($src); //operate img $font = 'data/fonts/TrajanPro3-Regular.otf'; $content = 'New Office XINTIANDI,Welcome!'; $color = imagecolorallocatealpha($image,255,255,255,50); imagettftext($image,20,0,20,100,$color,$font,$content); //output img //1.浏览器输出 header("Content-type",$info['mime']); $func = "image{$type}"; $func($image); //2.保存输出 $func($image,'newpic',$type); //distroy img imagedestroy($image); ?>