Jbert2 Posted July 6, 2008 Share Posted July 6, 2008 Anytime I mix my PHP that makes an image with this header ( 'Content-Type: image/jpeg' ); //imagejpeg($im, "images2/". $prefix . $filename, 100); imagejpeg($im); imagedestroy($im); I get header already sent. I have moved these lines every where and same thing. I need the HTML for other things. THANKS JIM Link to comment https://forums.phpfreaks.com/topic/113410-headers/ Share on other sites More sharing options...
ocpaul20 Posted July 6, 2008 Share Posted July 6, 2008 look at some captcha snippits. These are probably a good example of how yo do it. Link to comment https://forums.phpfreaks.com/topic/113410-headers/#findComment-582717 Share on other sites More sharing options...
trq Posted July 6, 2008 Share Posted July 6, 2008 Why would you need html within an image? You don't. Link to comment https://forums.phpfreaks.com/topic/113410-headers/#findComment-582720 Share on other sites More sharing options...
PFMaBiSmAd Posted July 6, 2008 Share Posted July 6, 2008 Your problem has to do with basic HTML. To output an image on a web page, you need an <img src="url_of_the_image" alt=""> tag for each image - http://www.w3schools.com/html/html_images.asp The url_of_the_image would be to your file with your code that outputs the header and the image data. Link to comment https://forums.phpfreaks.com/topic/113410-headers/#findComment-582721 Share on other sites More sharing options...
Jbert2 Posted July 6, 2008 Author Share Posted July 6, 2008 I understand image in HTML. After my PHP script runs it displays an image, that is all. My thoughts are that the display is not really on a page perse, just the monitor and that is why no code seems to work. Link to comment https://forums.phpfreaks.com/topic/113410-headers/#findComment-582744 Share on other sites More sharing options...
PFMaBiSmAd Posted July 6, 2008 Share Posted July 6, 2008 Post the error message and post the whole code you are using. Link to comment https://forums.phpfreaks.com/topic/113410-headers/#findComment-582894 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.