【问题标题】:PHP XML error on line 16 at column 6: xmlParsePI : no target name after upgrade apache php第 16 行第 6 列的 PHP XML 错误:xmlParsePI:升级 apache php 后没有目标名称
【发布时间】:2016-07-08 09:47:02
【问题描述】:

您好,请谁能帮我解决这个问题,升级apache php后出现此错误

第 16 行第 6 列的 PHP XML 错误:xmlParsePI:没有目标名称

仅供参考,我使用的是 sitemap.php 页面,然后设置 RewriteRule ^sitemap.xml?$ sitemap.php。 下面是我的 sitemap.php 代码

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>

【问题讨论】:

    标签: php xml apache .htaccess


    【解决方案1】:
    猜你喜欢
    • 2017-11-12
    • 1970-01-01
    • 2019-04-11
    • 2015-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多