错误提示:Warning: Cannot modify header information - headers already sent by (output started at E:\www\img.php:1) in E:\www\img.php on line 16
PHP已经启用了php_gd2.dll<?php
//建立图像
$height = 200;
$width =200;
$im = imagecreate($width,$height);
$white = imagecolorallocate($im,255,255,255);
$black1 = imagecolorallocate($im,0,0,0);
$black = imagecolorallocate($im,255,255,255);//在图上绘画
imagefill($im,0,0,$black1);
imageline($im,0,0,$width,$height,$white);
imagestring($im,4,50,150,"Sales",$white);//输出图像
header('Content-Type: image/png');
imagepng($im);//清理
imagedestroy($im);
?>
PHP已经启用了php_gd2.dll<?php
//建立图像
$height = 200;
$width =200;
$im = imagecreate($width,$height);
$white = imagecolorallocate($im,255,255,255);
$black1 = imagecolorallocate($im,0,0,0);
$black = imagecolorallocate($im,255,255,255);//在图上绘画
imagefill($im,0,0,$black1);
imageline($im,0,0,$width,$height,$white);
imagestring($im,4,50,150,"Sales",$white);//输出图像
header('Content-Type: image/png');
imagepng($im);//清理
imagedestroy($im);
?>
至少我的php页面上没有...
我用Fiddler2看看
utf16的会有2个字符的标签头
我之前有个页面也是,老是会自动在页面的第一句加一个空格,不管第一句写什么,反正就是会在第一句的第一个字符后面加一个空格,但不是所有的页面都会这样...
实在搞不懂啊...
和这有关系??
不然该改成什么编码??页面中会有中文哦(因为之前一直出这问题,所以先写这个简单的测试,结果还是出问题...)
将php另存为ANSI就可以了...
可是页面中的中文就变乱码了...
将编码改成GBK也不行...
另存为这种格式就可以了...
实在太感谢了...