XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
advertisement

Article:
 The Road to XHTML 2.0: MIME Types
Subject: Validating PHP
Date: 2004-01-24 13:22:45
From: Richard Allsebrook

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.


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Validating PHP
    2007-11-20 03:11:34 asilonline [Reply]

    very good
    bilgiyarismasi
    http://www.bilgipara.com

Sponsored By:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938