正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -267,9 +267,9 @@ class Demo extends Command | @@ -267,9 +267,9 @@ class Demo extends Command | ||
| 267 | public function handle(){ | 267 | public function handle(){ |
| 268 | $html = '<div><a>23423424</a><a href="#" class="logo img-box"><img src="https://cdn.globalso.com/fiberglass-expert/logo.png" alt="logoz9j"></a><img src = "123123"></div>'; | 268 | $html = '<div><a>23423424</a><a href="#" class="logo img-box"><img src="https://cdn.globalso.com/fiberglass-expert/logo.png" alt="logoz9j"></a><img src = "123123"></div>'; |
| 269 | $dom = str_get_html($html); | 269 | $dom = str_get_html($html); |
| 270 | - $texts = $dom->find('img',0); | 270 | + $aaa = $dom->find('.logo', 0)->find("img",0)->src; |
| 271 | // $texts = $dom->find('a', 0); | 271 | // $texts = $dom->find('a', 0); |
| 272 | - dd($texts); | 272 | + dd($aaa); |
| 273 | // $projectModel = new Project(); | 273 | // $projectModel = new Project(); |
| 274 | // $list = $projectModel->list(['delete_status'=>0,'type'=>['!=',0]]); | 274 | // $list = $projectModel->list(['delete_status'=>0,'type'=>['!=',0]]); |
| 275 | // foreach ($list as $v1){ | 275 | // foreach ($list as $v1){ |
-
请 注册 或 登录 后发表评论