致命错误:未捕获错误:在布尔值上调用成员函数find()

时间:2017-01-17 02:02:39

标签: php html parsing

我想从网站解析一些信息,但上面的错误即将来临

  

致命错误:未捕获错误:调用成员函数find()   C中的布尔值:\ xampp \ htdocs \ Parser \ parse_berufsfotografen.php:7 Stack   跟踪:#0 {main}被抛入   第7行的C:\ xampp \ htdocs \ Parser \ parse_berufsfotografen.php

我的代码是:

include_once('simple_html_dom.php');

$url = "http://www.berufsfotografen.com/reportagefotograf-eventfotograf";
$html = file_get_html($url);

foreach($html->find('a') as $element) {
    echo $element->plaintext;
    echo "<br>";
}

我做错了什么?

谢谢!

0 个答案:

没有答案