Php Simplepie和slash:注释

Php Simplepie和slash:注释,php,rss,simplepie,Php,Rss,Simplepie,我使用SimplePie在我的页面上显示RSS提要。 现在我想显示评论的数量 RSS: <slash:comments>0</slash:comments> 0 我如何用Simplepie显示这一点?您想用它来实现这一点。猜测一下,您想要http://purl.org/rss/1.0/modules/slash/名称空间,带有注释标记 $comments = $item->get_item_tags('http://purl.org/rss/1.0/module

我使用SimplePie在我的页面上显示RSS提要。 现在我想显示评论的数量

RSS:

<slash:comments>0</slash:comments>
0
我如何用Simplepie显示这一点?

您想用它来实现这一点。猜测一下,您想要
http://purl.org/rss/1.0/modules/slash/
名称空间,带有
注释
标记

$comments = $item->get_item_tags('http://purl.org/rss/1.0/modules/slash/', 'comments');
然后,您可以查看此数据结构,以确定您需要什么。猜猜看

$number = $comments[0]['data'];

源是否来自单个源?评论是在您的页面上还是在提要中?评论在页面上。但是在Feed中我有COUNT标签,它现在看起来不支持comments标签。您可以通过向类中添加另外两个函数来添加支持,如get_comment()&get_comment_tags()