alexguz79 Posted March 16, 2008 Share Posted March 16, 2008 Hey everybody... i have this HUGE question.... maybe you guys can help me i'm having this 'Cannot modify header information' problem: -------------------------------------------------------------------- Cannot modify header information - headers already sent by (output started at /home/mytrende/public_html/index_toptrends.php:7) in /home/mytrende/public_html/img_tech.php on line 8 -------------------------------------------------------------------- somewhere i read that you have to fix the first file on the line... not the second.... but when i check the file 'index_toptrends.php' everything looks ok to me... here is the code of that file: -------------------------------------------------------------------- <title>Trend*e :: Top Trends</title> </head> <body> <table width="1000" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td width="1000" height="19" valign="top"> <?php define('IN_SCRIPT','true'); $script_root = './'; include($script_root . 'head.php'); ?> </td> </tr> </table> <table width="1000" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td width="1000" height="19" valign="top"> <? define('IN_SCRIPT', 'true'); $script_root = './'; include($script_root . 'toptrends.php'); ?> </td> </tr> </table> </body> </html> -------------------------------------------------------------------- If you can help me.. plese... i.ve been reading about the problem but still can't fix it Quote Link to comment Share on other sites More sharing options...
l0ve2hat3 Posted March 16, 2008 Share Posted March 16, 2008 post your code for 'toptrends.php' Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted March 16, 2008 Share Posted March 16, 2008 and head.php Quote Link to comment Share on other sites More sharing options...
redarrow Posted March 16, 2008 Share Posted March 16, 2008 you are using <?php session_start()?> on another page and including it to a page that has html before session_start.... for the solution you need to use the ob_start() and ob_flush() at the end example.... This needs to be added to all included pages.php as your trying to use header info while useing html .. use this code format within head.php and toptrends.php <?php ob_start() session_start(); //bla bla bla php code on toptrends.php and head.php ob_flush(); ?> Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted March 16, 2008 Author Share Posted March 16, 2008 ok... thanx.... here is how i fix it.... found the answer on this forum forgot about the index_toptrends.... and forgot abot making changes to img_tech... on the page i wanted the image to display i just changed the code for a <img src="img_tech.php"> THAT FIX IT.... thanxs again Quote Link to comment 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.