<?php
//建立一副100*30的图像
$im=imagecreatetruecolor(100,30);
//设置背景颜色
$bg=imagecolorallocate($im,0,0,0);
//设置字体颜色
$textcolor=imagecolorallocate($im,0,255,255);
//把字符串写在图像左上角
imagestring($im,5,0,0,"Hello world!",$textcolor);
//输出图像
header("Content-type:image/jpeg");
imagejpeg($im);
?>
结果出现错误了,个人感觉好像header出现了问题啊!怎么回事?各位高手!
Warning: Cannot modify header information - headers already sent by (output started at
F:\AppServ\www\bookPHPlove\imageProcessing\imagesProcessingTechone.php:6) in
F:\AppServ\www\bookPHPlove\imageProcessing\imagesProcessingTechone.php on line 50;