tereglow Posted May 17, 2007 Share Posted May 17, 2007 Hello all, I have been working with the PEAR Image_Graph package which creates graphs that are PNG images. I want to take the image that it creates and embed it within an HTML page, however if I print anything to the screen prior to calling the graph, I get: Cannot modify header information - headers already sent by... I understand why it is doing this. I've basically created a PNG object and the header type shows that. My question is, does anyone know a viable workaround for this? I appreciate any help, if more information is needed, let me know. Tom Quote Link to comment https://forums.phpfreaks.com/topic/51897-solved-sending-headers-prior-to-a-png-object/ Share on other sites More sharing options...
chigley Posted May 17, 2007 Share Posted May 17, 2007 Save the image code as a separate file (say image.php) and then call it in the HTML: <img src="image.php" alt="" /> Quote Link to comment https://forums.phpfreaks.com/topic/51897-solved-sending-headers-prior-to-a-png-object/#findComment-255835 Share on other sites More sharing options...
tereglow Posted May 17, 2007 Author Share Posted May 17, 2007 Too easy. Thank you!!! Quote Link to comment https://forums.phpfreaks.com/topic/51897-solved-sending-headers-prior-to-a-png-object/#findComment-255844 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.