我通过 SimplePie 有这个提要项目:
<item>
<guid isPermaLink="false">tncms-asset-7f55e8da-c801-11e2-9a4d-001a4bcf887a</guid>
<title>Parts of old span may be used in bridge repair</title>
<author>Author Person</author>
<link>http://www.mysite.com/a.html</link>
<description><![CDATA[Description Here.]]></description>
<pubDate>Tue, 28 May 2013 18:45:00 -0700</pubDate>
<enclosure url="http://mysite.com/happyLilPic.jpg" length="512" type="image/jpeg" />
</item>
除了带有以下内容的图像外,我可以显示其他所有内容:
<?php
foreach ($feed->get_items() as $item):
?>
<div class="item">
<h3><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></h3>
<p><?php echo $item->get_description(); ?></p>
<?php echo "<img src=\"" . $item->get_enclosure['url'][0] . "\">"; ?>
<br><br>
</div>
<?php endforeach; ?>
我的机箱做错了什么???