Sign In/My Account | View Cart  
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

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

    • Validating PHP
      2010-08-28 09:33:25 chunsli

      rolex replica (http://www.rolexreplicascollection.com/)
      louis vuitton handbags (http://www.louis-vuitton-handbag.net/)
      DM800 (http://www.traderainbow.com)
      ed hardy (http://www.edhardyclothesshop.com)

    • Validating PHP
      2010-05-17 23:49:34 lin lin

      <marquee>linhanthein</marquee>


Sponsored By: