|
...
|
...
|
@@ -266,10 +266,12 @@ class Demo extends Command |
|
|
|
// }
|
|
|
|
public function handle(){
|
|
|
|
$html = '<div><a>23423424</a><a href="#" class="logo img-box"><img src="https://cdn.globalso.com/fiberglass-expert/logo.png" alt="logoz9j"></a></div>';
|
|
|
|
$dom = str_get_html($html);
|
|
|
|
$texts = $dom->find("a[class=logo]",0);
|
|
|
|
$html = str_get_html($html);
|
|
|
|
$dom = new \simple_html_dom(); //new simple_html_dom对象</p><p>
|
|
|
|
$texts = $dom->load($html);
|
|
|
|
// $texts = $dom->find("a[class=logo]",0);
|
|
|
|
// $texts = $dom->find('a', 0);
|
|
|
|
dd($dom);
|
|
|
|
dd($texts);
|
|
|
|
// $projectModel = new Project();
|
|
|
|
// $list = $projectModel->list(['delete_status'=>0,'type'=>['!=',0]]);
|
|
|
|
// foreach ($list as $v1){
|
...
|
...
|
|