Reputation: 1259
i have the strangest bug. in my php file i include several php files:
<?php
include("a.php");
include("b.php");
include("c.php");
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="src/main.css" ></link>
<script src="src/jquery-1.3.2.js" type="text/javascript" ></script>
</head>
<body>
some more code here...
when the page is rendered, i see that there are about 18px added to the layout, and the link and script tags were moved inside the body section. If i remove the include of b.php and c.php it doesn't happen.
any thoughts?
Upvotes: 0
Views: 245
Reputation: 53607
4. do
?><html>
instead of
?>
<html>
Upvotes: 2
Reputation: 546143
Check there's no whitespace at the end of the included files after you final closing ?>
. The easiest way to be sure there's nothing after that is to remove it altogether:
<?php
// here is my file
// and i don't have to close the PHP tag
// woo
Upvotes: 0