xeonman13 — 2012-02-29T22:00:57-05:00 — #1
I am trying to create a dashboard on a php website which shows graphs.
I can get the graphs to work on their own but when I try to mix in text or include the graph.php page in a regular php page, it doesnt work.
Says headers were already sent. I have narrowed it down to "header("Content-type: image/png"); " being at the top of the page.
HEre is my question.
Lets say I have a page, "dashboard.php". I also have graph1.php, graph2.php and graph3.php.
I want to include those into dashboard.php. How do I handle this. When I do it now it says : Cannot modify header information - headers already sent by ..." Obvioulsy because the included page (graph1.php) contains the header content type line.
how to i fix this?!?
Thanks in advance.
ralphm — 2012-02-29T22:55:16-05:00 — #2
Have you tried removing that? You don't need those in an include file.
wonshikee — 2012-02-29T23:29:08-05:00 — #3
<img src='graph1.php' />
Yes it's that simple
xeonman13 — 2012-03-01T11:11:18-05:00 — #4
Ok thanks. never thought of doing an img src with anything besides an image file. this helps.