Jump to content

Why in the world is it doing this?


Lamez

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/216332-why-in-the-world-is-it-doing-this/
Share on other sites

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.

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");

?>


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...

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.