新しい質問: この質問は奇妙すぎます。 。 RSS の基本的な応用について
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php require_once('magpierss/rss_fetch.inc'); $url = "http://localhost/PHPProject/RSS/RSS.xml"; $rss = fetch_rss($url); $feedTitle = $rss->channel['title']; echo '<p>Latest News from <strong>' . $feedTitle . '</strong></p>'; foreach ($rss->item as $it) { $link = $it['link']; $title = $it['title']; $description = isset($it['description']) ? $it['description'] : ''; echo '<p><a href=\"$link\">' . $title . '</a><br />' . $description . '</p>'; } ?>
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?xml version="1.0" encoding="UTF-8" ?> - <rss version="2.0"> - <channel> <title>XHTML</title> <link>http://localhost/PHPProject/NewFile.html</link> <description>Free web building tutorials</description> <category>Web development</category> <language>en-US</language> <copyright>2006 w3school.com.cn. All rights reserved.</copyright> - <item> <title>RSS Tutorial</title> <link>http://localhost/PHPProject/NewFile.html</link> <description>New RSS tutorial on W3School</description> <author>service@w3school.com.cn</author> <comments>http://localhost/PHPProject/NewFile.html</comments> </item> </channel> </rss>
<チャンネル> ... <アイテム>...アイテム> <アイテム>...アイテム> チャンネル>
------解決策------------------