所以我刚刚和CI一起创建了我的第一个RSS提要,或者说我做了.现在我的视图显示我的RSS页面的顶部(标题和描述),但所有项目都被省略.当我右键单击 - >查看源时,它包含项目标签中的所有项目.
谁能帮我?
查看(rss.php):
<?php echo '<?xml version="1.0" encoding="'.$encoding.'"?>'."\n"; ?>
<rss version="2.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title><?php echo $feed_name; ?></title>
<link><?php echo $feed_url; ?></link>
<description><?php echo $page_description; ?></description>
<dc:language><?php echo $page_language; ?></dc:language>
<dc:creator><?php echo $creator_email; ?></dc:creator>
<dc:rights>Copyright <?php echo gmdate("%Y", time()); ?></dc:rights>
<dc:date><?php echo gmdate("%Y-%m-
T;%H:%i:%s%Q", time()); ?></dc:date>
<admin:generatorAgent rdf:resource="http://www.codeigniter.com/" />
<?php foreach($items as $entry): ?>
<?php $entry_url = base_url().$this->lang->lang().$localized_news[$this->lang->lang()].'/'.print_date(strtotime($entry->published), "{year}/{month2}").'/'.$entry->slug; ?>
<item>
<title><?php echo xml_convert($entry->title); ?></title>
<link><?php echo $entry_url; ?></link>
<guid><?php echo $entry_url; ?></guid>
<description><?php echo $entry->summary; …Run Code Online (Sandbox Code Playgroud)