Reputation: 87
I've tried what seem to be the usual fixes I've seen from replies around on these boards and other places found on Google and I've only managed to change the characters.
even using <?php ?>
will end up inserting:
^ seems not much is showing up when I copy and paste. you can view the link http://boxxie.org/itd/header.php
as you can see theres a lot of blank spaced inserted before the html which makes for some undesired results
I tried adding in:
header("Content-Type: text/html; charset=utf-8");
and
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
those got rid of the actual character that was being put there but surely nothing should be there at all.
EDIT:
heres code for the whole page at moment:
<?php
// error_reporting( E_ALL );
// ini_set( "display_errors", 1 );
header("Content-Type: text/html; charset=utf-8");
?>
<!DOCTYPE html>
<html>
<head>
<title>In The Distance</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="header"><h1>Some text here</h1><h2>lorem ipsum etcetera?</h2></div>
<div id="left"></div>
<div id="content"></div>
<div id="footer"></div>
</body>
</html>
Upvotes: 0
Views: 73
Reputation: 87
Ok seems there was a problem with my editor rather than my php. It had entered a non space white character after the first closing php tag. if you copy the code into a text editor goto the end of the line and press the left and right arrow keys you'll notice you'll have to press it twice before it actually moves. deleted that and all works now. Cheers for the suggestions though!
Upvotes: 0
Reputation: 125
Take a look at: http://gyazo.com/cbea74e947814dd37b2096119f10960a
The blank line after the body is the problem in the output.
Try deleting these 2 comment lines:
// error_reporting( E_ALL );
// ini_set( "display_errors", 1 );
Upvotes: 0
Reputation: 686
Please check your php code(s) for whitespaces before and end of php scripts. Example:
_
<?php
// here whitespaces are safe for html
?>_
__
where "_" - whitespace like enter, tab or space.
Upvotes: 2