Forum Moderators: bakedjake
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Page Title</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
<meta http-equiv="Cache-Control" content="max-age=600" />
<meta http-equiv="content-type" content="application/xhtml+xml" />
</head>
<body>
<?php include 'inc_header.php'?>
<h1>Page Heading</h1>
<p>Page Content</p>
<p><?php echo "PHP-generated Content";?></p>
</body>
</html>
This example was taken from the dotMobi Mobile Web Developers Guide, and as far as I can tell, the page should be valid. Perhaps it is a server issue?
Note: If I remove the first line (<?xml ...?>) then it displays just fine and validates on ready.mobi with a 5 rating.
Any ideas?
<? as well as <?php to delimit PHP code. As such, the XML prolog causes an error. You should either disactivate short tags, or echo the XML prolog:
<?php echo '<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n';?>