用PHP简单的HTML DOM解析器获取评论 [英] Get Comments with PHP Simple HTML DOM Parser
本文介绍了用PHP简单的HTML DOM解析器获取评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否可以提取HTML注释(<
可以吗?
解决方案
直接来自他们的文档:
//查找所有评论(<! ..-->)block
$ es = $ html-> find('comment');
http://simplehtmldom.sourceforge.net/manual.htm
I'm working with PHP Simple HTML DOM Parser.
I was wondering if it is possible to extract the HTML comments (<!-- -->
).
Can you?
解决方案
Directly from their docs:
// Find all comment (<!--...-->) blocks
$es = $html->find('comment');
http://simplehtmldom.sourceforge.net/manual.htm
这篇关于用PHP简单的HTML DOM解析器获取评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文