简体   繁体   English

使用PHP Simple HTML DOM解析器获取评论

[英]Get Comments with PHP Simple HTML DOM Parser

I'm working with PHP Simple HTML DOM Parser. 我正在使用PHP Simple HTML DOM解析器。

I was wondering if it is possible to extract the HTML comments ( <!-- --> ). 我想知道是否有可能提取HTML注释( <!-- --> )。

Can you? 你是否可以?

Directly from their docs: 直接从他们的文档:

// Find all comment (<!--...-->) blocks 
$es = $html->find('comment');

http://simplehtmldom.sourceforge.net/manual.htm http://simplehtmldom.sourceforge.net/manual.htm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM