注册 登录
编程论坛 PHP技术论坛

[求助]如何解决php编程中的如下问题

青蛙 发布于 2005-11-27 14:53, 962 次点击
<?php
Header("Content-type:image/gif");
$string=implode($argv,"");
$im=imagecreatefromgif("2.gif");
$orange=ImageColorAllocate($im,220,210,60);
$px=(imagesx($im)-7.5*strlen($string))/2;
ImageString($im,3,$px,9,$string,$orange);
ImageGif($im);
ImageDestroy($im);
?>


Warning
: Cannot modify header information - headers already sent by (output started at F:\qingwa\php\index.php:8) in F:\qingwa\php\index.php on line 9
请问这个问题怎么解决
4 回复
#2
wangshaobo2005-11-28 10:32
将本页中的其他系统生成的代码全部删掉,只留你自己的代码,注意在&lt;? PHP前不能有空行
#3
青蛙2005-11-28 14:42
十分感谢楼上的朋友,不过为什么要将系统生成的代码删掉呢,想弄清楚原因.
#4
wangshaobo2005-11-28 18:30

删除那些代码是因为:PHP中header语句前面不能够有任何输出语句,如echo,html等,否则就会出错

#5
青蛙2005-11-28 19:34
再次感谢楼上的兄弟,偶明白了.
1