
Originally Posted by
drg
doesn't adequately support XHTML.
Doesn't support at all. MS promised they would, and didn't (no suprise), and so a majority of the web is still error laden with bugs and hacks everywhere... XHTML would have done away with most of this, because as it is a facet of XML it displays errors in the document rather than try to render the page. I have the same problem, so i just send it with an html** content type header so it IE error corrects it into html. i don't reccommend this use, though.
source anyways, if you really want to use it.
PHP Code:
<?php
if (
!strstr($_SERVER["HTTP_USER_AGENT"],"MSIE") ||
strstr($_SERVER["HTTP_USER_AGENT"],"like MSIE") ||
strstr($_SERVER["HTTP_USER_AGENT"],"Opera")
) {
header("Content-type: application/xhtml+xml; charset=UTF-8");
echo"<?xml version=\"1.0\"?>";
} else {
header("Content-type: text/html; charset=UTF-8");
$fail = TRUE;
}
error_reporting(E_ALL);
$base = "http://boxxertrumps.bo.funpic.org/";
?>
EDIT: **actually, i just don't send it with an xhtml contype, sorry to confuse if you are.
EDIT2: needed to send as UTF-8, b/c default is an ISO one i changed the code.
Bookmarks