SimplePie RSS 未获取 pubDate
我正在使用 SimplePie RSS 聚合 4 个提要,它们按日期(降序)排序,并且在代码中设置为回显 pubDate,但没有显示它。它只打印一个空白元素。
为了理智起见(由于代码文件有几十行长,我将其放在服务器上的 *.txt 文件中,可以在此处找到:http://feeds.powercastmedia.net/feeds.php.txt
我完全迷失了。
干杯!,
菲尔
I am using SimplePie RSS to aggregate 4 feeds and they are being sorted by the date (descending) and in the code it is set to echo out the pubDate but it is not showing it. It just prints a blank element.
For sanaties sake (as the code file is tens of lines long I have it in a *.txt file on my server which can be found here: http://feeds.powercastmedia.net/feeds.php.txt
I am completely lost.
Cheers!,
Phill
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在 echo 调用中放置其他信息,以确保这些行确实被调用,并且输出以预期的方式显示 -
这种“调试输出”可以帮助调试各种事情。它应该可以帮助您准确地找出问题的根源。
另外,我注意到您有许多不必要的 PHP 开始和结束标记,其中多行可以合并为一个更干净的代码块(例如:)
可以清理为:
事实上,大部分文件可能在一个内一对 PHP 标签。
只是一个建议。
Try placing other information in the echo calls to ensure that those lines are actually being called, and that the output is being displayed in the expected manor -
This kind of "debug output" can help with debugging all sorts of things. It should help you figure out exactly where the problem is originating from.
Also, I noticed that you have numerous unnecessary PHP opening and closing tags, where multiple lines could be consolidated into a single, cleaner code block (Ex:)
Could be cleaned up to be:
In fact, most of the file could be within one pair of PHP tags.
Just a suggestion.