正如标题所说......,这是我的代码
include "simple_html_dom.php";
$url1="https://www.dikaiologitika.gr/eidhseis/theseis-ergasias";
$html = file_get_html($url1);
// Find all anchors
$anchors = $html->find("/html/body/div[1]/div/div/article/h3/a", 0);
echo $anchors->plaintext . '<br>';
$html->clear();
unset($html);
我得到的错误是::
Fatal error: Call to a member function find() on a non-object in
init.php on line 100
第100行
$anchors = $html->find("/html/body/div[1]/div/div/article/h3/a", 0);
我想要抓的是文章标题及其链接,我无法看到我做错了什么,请帮助
欢呼