我正在尝试获取该主题的下一页,但它给出了错误。有什么方法可以避免该错误,以便能够在该年龄主题中抓取下一页?(下一页是 20 和之后是 40 等等)下面给出了错误,我确定有人会要求我发布代码,但不确定我应该发布多少或什么代码。
http://blah.com/quotes/topic/age 20 1 1http://blah.com/quotes/topic/age/20
Fatal error: Call to a member function find() on a non-object in /Users/blah/Sites/simple_html_dom.php on line 879
更新***
这是870-885之间的线
function save($filepath='') {
$ret = $this->root->innertext();
if ($filepath!=='') file_put_contents($filepath, $ret, LOCK_EX);
return $ret;
}
// find dom node by css selector
// Paperg - allow us to specify that we want case insensitive testing of the value of the selector.
function find($selector, $idx=null, $lowercase=false) {
return $this->root->find($selector, $idx, $lowercase);
}
// clean up memory due to php5 circular references memory leak...
function clear() {
foreach ($this->nodes as $n) {$n->clear(); $n = null;}