我尝试使用php + mysql写一个RSS提要但我收到网络错误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";
答案 0 :(得分:0)
好的......现在试试echo $article["title"]."\n"
?