100分! 简单的问题,我一旦运行header( ); 必然告知:Cannot modify header information ........
norsd 2005-05-30 01:30:33 我一旦运行header( ); 必然告知:Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\test.php:1) in C:\Program Files\Apache Group\Apache2\htdocs\test.php on line 1
我发誓没有空格或者空行,我的程序这样:
<html><head><title>First program</title></head><body><script language="php">header("Content-type:image/png");
$img_handle = ImageCreate (230, 20) or die ("Cannot Create image");
$back_color = ImageColorAllocate ($img_handle, 0, 10, 10);
$txt_color = ImageColorAllocate ($img_handle, 233, 114, 191);
ImageString ($img_handle, 31, 5, 5, "My first Program with GD", $txt_color);
ImagePNG ($img_handle);
</script>
</body>
</html>
如果我去除 header(....); 这个,程序就不会报错,当然也不会显示图像了。
求救!郁闷死了。谢谢