[請益]提供RSS訂閱問題
請問各位大大們
執行以下rss程式,是正常的。可以撈出很多筆資料(訂閱文章前的畫面)
例如:可以撈出資料庫裡blog的前10筆文章
但是問題來了!!
只要我按下 (訂閱此摘要)
在摘要那裡卻怎麼樣都只會顯示出一筆資料而已。(訂閱後的畫面)
PS: 我的瀏覽器是使用ie8
煩請各位大大 救救我
<?
echo '<?xml version="1.0" encoding="utf-8" ?>';
//get the news you want to display
include("Db.inc.php");
$getnews = "select * from db_rss where if_subject = 'T' order by del_serial
ASC ";
$res = & $mdb2->query($getnews);
if(PEAR::isError($res))
die('查詢失敗' . $res->getMessage());
?>
<rss version="2.0">
<channel>
<title>Aman la vida</title>
<link>http://127.0.0.1/xxxxx/index.php</link>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<description>Aman la vida</description>
<?
while($r = $res->fetchRow()){
extract($r);
//clean the news form unwanted chars
$news_day=stripslashes($postdate);//公告日期
$news_title=stripslashes($subject);//公告標題
$news_message=preg_replace("/(<\/?)(\w+)([^>]*>)/e"," ", $message);
//公告內容(remove html tags because they return errors)
?>
<item>
<title><?=$news_title?></title>
<description><?=$news_message?></description>
<link>http://127.0.0.1/xxxxxxx/showpost.php?page=<?=urlencode($news_title)?></link>
<pubDate><?=$news_day;?></pubDate>
<guid>http://127.0.0.1/xxxxx/rss_2.php</guid>
</item>
<? }?>
</channel>
</rss>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.134.30.167
推
08/08 09:48, , 1F
08/08 09:48, 1F
→
08/08 12:18, , 2F
08/08 12:18, 2F
→
08/08 12:18, , 3F
08/08 12:18, 3F
→
08/08 19:33, , 4F
08/08 19:33, 4F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章