<?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>
1. 为什么运行显示为: Latest News from W3School Home Page
RSS Tutorial New RSS tutorial on W3School
后点击RSS Tutorial后却显示HTTP 403?
2. 在PHP中的foreach ($rss->item as $it)中的item为什么非要设置items才可以运行成功,否则为 Latest News from W3School Home Page
Notice: Undefined property: MagpieRSS::$item in D:\Apache Group\Apache2\htdocs\PHPProject\index5.php on line 10
Warning: Invalid argument supplied for foreach() in D:\Apache Group\Apache2\htdocs\PHPProject\index5.php on line 10
但我的XML中<channel>之内是<item>而非<items>喔。。。。
3. 我修改XML文件之前的<channel>中的<title>是“W3School Home Page”,所以运行时显示为Latest News from W3School Home Page;但修改后却如上所示<title>XHTML</title>,为什么刷新后也显示Latest News from W3School Home Page?
就算重启整个zend studio都继续显示Latest News from W3School Home Page,真不明白。。。。也不关缓存的事啊。。我已经清除了缓存了