archVille Posted May 28, 2006 Share Posted May 28, 2006 Cannot modify header information - headers already sent byThis is the message when i enter the below easy and small source code FOR CREATING A FILLED RECTANGLE :<?phpheader("Content-Type: image/gif");$im = ImageCreate(100, 100);// colors...$black = ImageColorAllocate($im, 0, 0, 0);$white = ImageColorAllocate($im, 255, 255, 255);// draw rectangleImageFilledRectangle($im, 25, 25, 75, 75, $white);// Print and destroy the imageImageGIF($im);ImageDestroy($im);?>After that message i get a lot of unrecognizable string characters ...What is wrong ????? Anyone? Link to comment https://forums.phpfreaks.com/topic/10636-cannot-modify-header-information-headers-already-sent-by/ Share on other sites More sharing options...
wild_dog Posted May 28, 2006 Share Posted May 28, 2006 [!--quoteo(post=377781:date=May 28 2006, 04:26 AM:name=PMeres)--][div class=\'quotetop\']QUOTE(PMeres @ May 28 2006, 04:26 AM) [snapback]377781[/snapback][/div][div class=\'quotemain\'][!--quotec--]Cannot modify header information - headers already sent byThis is the message when i enter the below easy and small source code FOR CREATING A FILLED RECTANGLE :<?phpheader("Content-Type: image/gif");$im = ImageCreate(100, 100);// colors...$black = ImageColorAllocate($im, 0, 0, 0);$white = ImageColorAllocate($im, 255, 255, 255);// draw rectangleImageFilledRectangle($im, 25, 25, 75, 75, $white);// Print and destroy the imageImageGIF($im);ImageDestroy($im);?>After that message i get a lot of unrecognizable string characters ...What is wrong ????? Anyone?[/quote]If you can try and post a screenshot or an example of the error you are gettingCheers Link to comment https://forums.phpfreaks.com/topic/10636-cannot-modify-header-information-headers-already-sent-by/#findComment-39660 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.