0

Hello please anyone can help me to solve this problem, this error occur after upgrade apache php

PHP XML error on line 16 at column 6: xmlParsePI : no target name,

Fyi, i am used sitemap.php page then set RewriteRule ^sitemap.xml?$ sitemap.php. Below is my sitemap.php code

header("Content-Type: text/xml;charset=iso-8859-1");
echo '<?xml version="1.0" encoding="UTF-8"?><urlset  xmlns="http://www.google.com/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; 
include "config.php";
include "dbclass.php";
include "classes.php";
include "fgeneral.php";
$mydb = new myDBC();
//HOME
$result = $mydb->runQuery("SELECT * FROM `homepage`");
$row = $mydb->runFetchArray($result);
$date = $row["date"]; //the date stored
$year = substr($date,0,4); //work out the year
$mon  = substr($date,5,2); //work out the month
$day  = substr($date,8,2); //work out the day
$displaydate = ''.$year.'-'.$mon.'-'.$day.'';
?>
<url>  
<loc><?=ROOT_URL?></loc>  
<lastmod><?=$displaydate?></lastmod>  
<changefreq>weekly</changefreq>  
<priority>1.00</priority>  
</url>
Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

Problem resolved, i found solution here 'xmlParseEntityRef: no name' warnings while loading xml into a php file and http://www.stevenmarkford.com/resolution-xmlparseentityref-noname-xml-error/

Community
  • 1
  • 1