入门级
simple_html_dom插件
用dom处理html文件的利器
使用:
加载simple_html_dom.php文件
require_once 'simple_html_dom.php'
new simple_html_dom对象
$dom = new simple_html_dom()
加载html
$dom->load($html);
find()方法
$dom->find('div.lookLeftname', 0)->plaintext
class=‘lookLeftname'的div中的纯文本
$dom->find('div.lookLeftname', 0)->innertext
class='lookLeftname'的div中的内部文本
完整测试实例
| 代码如下 | 复制代码 |
|
<?php for($i=1;$i
$html = file_get_html(https://www.111cn.net); "; } ?> |
|
TPLink TLWDR4320 无线路由器IP带宽控制功能分配带宽设置方法
SQL Server 2008及更高版本数据库恢复做法之日志尾部备份实用指南
TPLink TLWDR4320 无线路由器控制管控小孩上网行为设置
TPLink TLWDR4320 无线路由器打印服务器设置指南
TPLink TLWDR8620 52 无线路由器当作交换机使用教程
TPLink TLWDR8620 52 无线路由器映射服务器到外网操作方法