我尝试用 php+mysql 编写一个 RSS 提要,但我得到了 internat 错误 500,我确定它来自 while 循环,谢谢你的帮助。
代码:
$result = mysql_query($query_site_archive);
while ($article = mysql_fetch_assoc($result))
{
$details = '<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title>'. $article["title"] .'</title>
<link>http://localhost/website/'. $folder .'/details.php?articleid ='.
$article["articleid"] .'&parentid ='. $article["parentid"] .'&catid ='.
$article["catid"] . '</link>
<description>'. $article["description1"] .'</description>'
}
echo '</channel></rss>';
echo "$details";