|
As the W3C validator doesnt send a HTTP_ACCEPT header, you must modify the PHP sample above to read:
if ( isset($_SERVER["HTTP_ACCEPT"]) and stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("Content-type: application/xhtml+xml");
}
else {
header("Content-type: text/html");
}
Otherwise an error message is squirted out before the header. This causes further problems as headers MUST be sent before any content.
|