<?php
// Display the error message according to each data code.
$xml = '<?xml version="1.0" encoding="utf-8"?><results>';
if($_GET['code'] == "500"){
$xml .= '<error id="500" message="Error 500"></error>';
}else if($_GET['code'] == "501"){
$xml .= '<error id="501" message="Error 501"></error>';
}
$xml .= '</results>';
header ("Content-Type:text/xml");
echo ($xml);
?>
我收到了这个错误
This page contains the following errors:
error on line 3 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.
明文形式
<?xml version="1.0" encoding="UTF-8"?><results><error id="501" message="Invalid Course Code"></error> </results>
<!-- Hosting24 Analytics Code -->
<script type="text/javascript" src="http://stats.hosting24.com/count.php"></script>
<!-- End Of Analytics Code -->