代码如下:
<?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 );
= =我逗了.谢谢~
= =我逗了.谢谢~