Home >Backend Development >PHP Tutorial >PHP图像乱码问题
代码如下:
<?php$image = imagecreatetruecolor( 100, 30 );//$bgcolor = imagecolorallocate( $image, 255, 255, 255 );//imagefill( $image, 0, 0, $bgcolor );ob_clean();header( "Content-type = image/png" );imagepng( $image );//endimagedestroy( $image );?>
header( "Content-type = image/png" );
改为
header( "Content-type:image/png" );
$image = imagecreatetruecolor( 100, 30 );//$bgcolor = imagecolorallocate( $image, 255, 255, 255 );//imagefill( $image, 0, 0, $bgcolor ); ob_clean();header( "Content-type:image/png" );imagepng( $image ); //endimagedestroy( $image );
= =我逗了.谢谢~
= =我逗了.谢谢~