在过去的 6 周里,我一直在用 php 和 mysqli 开发一个自定义社交网络。无论如何,今天我决定为博客系统创建一个提要。我已经使用 w3 提要验证服务检查了我的脚本,它运行良好!问题是页面上没有显示任何提要,这是我的脚本.....>
<?php include"php_includes/db_conx.php"; ?>
<?php header('Content-type: text/xml'); ?>
<?php echo '<?xml version="1.0" encoding="iso-8859-1"?>';
?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Birdbooks Blog Feed</title>
<description>Birdbook is a Social Network with Birders in mind</description>
<link>http://www.birdbook.org.uk/</link> <copyright> copyright 2013 Birdbook Social Network</copyright>
<atom:link href="http://www.birdbook.org.uk/feed/" rel="self" type="application/rss+xml" />
<?php $query = "SELECT * FROM 'blog' ORDER BY 'delimiter' DESC LIMIT 0,15";
$results = $db_conx->query($query);
$number = $results->num_rows;
for ($i = 1; $i <= $number; $i++) {
$row = $results->fetch_assoc();
$title = $row['blogtitle'];
$description = $row['description'];
$link = $row['linklabel'];
$date = date("r", $row['lastmodified']);
?>
<item>
<title><?php echo $title; ?></title>
<description><?php echo $description; ?></description>
<link><?php echo $link; ?></link>
<pubDate><?php echo $date; ?></pubDate>
<guid><?php echo $link; ?></guid>
</item>
<?php } ?>
</channel>
</rss><?php $db->close(); ?>
有人有任何想法吗?非常感谢.. Phillip Dews