Lamez Posted October 20, 2010 Share Posted October 20, 2010 I am getting nothing but my HTML outputted. Here is a screen shot: http://i.imgur.com/yoetz.png I have tested this on three different Apache servers, so I know it is not the settings. I am clueless and not sure why this is happening. Here is some code: <?php include("core/main.php"); //$page = new Page("New", ""); //$page->header(); //$page->footer(); include("core/includes/pages/header.php"); echo "STUFF"; include("core/includes/pages/footer.php"); ?> Hey, thanks guys. I am unsure. I am not really sure on what code I should post. That is the exact code from the screen shot. Please help me solve this riddle! Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/ Share on other sites More sharing options...
BlueSkyIS Posted October 20, 2010 Share Posted October 20, 2010 maybe mime type header? what headers are you outputting before sending the HTML? Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124227 Share on other sites More sharing options...
Lamez Posted October 20, 2010 Author Share Posted October 20, 2010 None that I know about. I am not setting anything, not sure on how to check this. Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124228 Share on other sites More sharing options...
BlueSkyIS Posted October 20, 2010 Share Posted October 20, 2010 can you post core/includes/pages/header.php? and/or as much of the other code as possible. it's hard to tell what's going on with that little bit. Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124229 Share on other sites More sharing options...
Lamez Posted October 20, 2010 Author Share Posted October 20, 2010 Sure, mind it is long and a split up template I downloaded. Side note: I hate using pre-made templates, but I am kind of on a time crunch. header.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>title</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="style/default.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- @import url("style/layout.css"); --> </style> </head> <body> <div id="wrapper" class="bg4"> <div id="menus"> <p class="style1" id="mainmenu"></p> <p class="style1" id="topmenu"><a href="#">Home</a> | <a href="#">Contact</a></p> </div> <br /> <center><font size="6">Krazy Pickem</font></center> <br /> <div id="content" class="two-col"> <div class="colA bg10"> <div id="box1" class="box bg6"> <div class="bg7"> <div class="title"> <h2 class="text1"><b>Top Ten Players</b></h2> </div> <div class="content bg5"> <ul class="ul1"> <li class="toplink"><a href="#" class="link1"><b>Vestibulum gravida</b></a></li> </ul> </div> </div> <div class="extra"> <div class="extraL"></div> <div class="extraR"></div> </div> </div> <!-- end #box1 --> </div> <!-- end .colA --> <div class="colB"> <div class="bg16"> <div class="bg17"> <div id="search" class="bg12"> <p class="text2"></p> <a href="#" class="link2"></a> </div> <!-- end #search --> <div id="box7" class="bg15"> footer.php <h2 class="text4"><b>title</b></h2> <p class="text5">Date Went here</p> </div> <!-- end #box7 --> <div id="box8" class="bg18" style="padding-bottom:1px;"> <p>Content Sun of a gun</p> </div> <!-- end #box8 --> <div style="clear: both"></div> </div> </div> <div class="extra"> <div class="extraL"></div> <div class="extraR"></div> </div> </div> <!-- end .colB --> <br style="clear: both" /> </div> </div> <div id="footer" class="bg21"> <div class="extraL"></div> <p class="style2">Copyright or something</p> <div class="extraR"></div> </div> </body> </html> I still don't understand. Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124230 Share on other sites More sharing options...
BlueSkyIS Posted October 20, 2010 Share Posted October 20, 2010 what is the name of the script that is using header and footer? Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124233 Share on other sites More sharing options...
Lamez Posted October 20, 2010 Author Share Posted October 20, 2010 index.php Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124234 Share on other sites More sharing options...
BlueSkyIS Posted October 20, 2010 Share Posted October 20, 2010 also, what's in core/main.php? Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124235 Share on other sites More sharing options...
Lamez Posted October 20, 2010 Author Share Posted October 20, 2010 Oh ya! <?php $path = ""; include($path."core/includes/constants.php"); include($path."core/includes/Database.php"); include($path."core/includes/Form.php"); include($path."core/includes/Html.php"); include($path."core/includes/Email.php"); include($path."core/includes/Session.php"); include($path."core/includes/Password.php"); include($path."core/includes/Page.php"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124236 Share on other sites More sharing options...
BlueSkyIS Posted October 20, 2010 Share Posted October 20, 2010 oh crap. there are so many includes... well, okay. what happens when you comment out core.php? <?php //include("core/main.php"); include("core/includes/pages/header.php"); echo "STUFF"; include("core/includes/pages/footer.php"); ?> then try the other includes one by one... Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124237 Share on other sites More sharing options...
Lamez Posted October 20, 2010 Author Share Posted October 20, 2010 You are a genius, why did I not think of that? So I commented out main.php and it worked. Then I went and starting commenting out each include to see which one it is. Turns out, when I comment out Email.php it works. Now I have to figure out what is in Email.php that is doing this! Another side note: I did it right when you where typing, I guess we are on the same page. Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124238 Share on other sites More sharing options...
BlueSkyIS Posted October 20, 2010 Share Posted October 20, 2010 no, i am very un-genius. it's just experience, breaking things down. Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124240 Share on other sites More sharing options...
Lamez Posted October 20, 2010 Author Share Posted October 20, 2010 HA! Turns out I was sending out headers, I forgot I had this line in my constructor my Email class header('Content-Type: text/plain'); Quote Link to comment https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/#findComment-1124249 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.