入门级
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); "; } ?> |
|
DeepSeek多模态怎么样及保姆级配置教程(codex、claude)实用指南
WSL2+Docker+Ollama本地部署大模型思路和实践指南(Qwen1.8b)实用指南
DeepSeek Harness热门插件盘点:10个实用插件,覆盖多Agent、上下文和多模态实用指南
grep文本搜索与正则表达式完整代码示例实用指南
AI漫剧伪装直男1‑24集无雾版夸克网盘资源免费分享
AI漫剧玉僧入尘1-68集无雾无删版夸克网盘资源免费分享