為什么我一輸出中文就不能顯示圖片呢?
<?php
header("Content-Type:text/html; ? charset=utf-8");
header("Content-type: image/png");
//echo '創(chuàng)建一張圖片';
$img=imagecreatetruecolor(200, 200);
$red=imagecolorallocate($img, 0x00, 0x00, 0x00);
imagefill($img, 0, 0, $red);
imagepng($img);
imagedestroy($img);
2017-04-06
header("Content-Type:text/html; ? charset=utf-8");
header("Content-type: image/png");
//echo '創(chuàng)建一張圖片'
$img=imagecreatetruecolor(200, 200);
$red=imagecolorallocate($img, 0xFF, 0x00, 0x00);
$black = imagecolorallocate($img,0x00,0x00,0x00);
imagefill($img, 0, 0, $red);
imagestring($img,5,10,10,'hello',$black);
imagepng($img);
imagedestroy($img);