PHPシンプルなHTML DOMパーサ致命的なエラー:それをしないのはなぜ行に/home/admin/web//public_html/index.phpにブールにメンバー関数find()に14
Fatal error: Call to a member function find() on boolean in /home/admin/web//public_html/index.php on line 14
を呼び出し失敗します?
include("simple_html_dom.php");
$html = file_get_html('http://en.wikipedia.org/wiki/facebook');
$title = $html->find('h1[id=firstHeading]',0)->innertext;
echo $title;
$ htmlのvarがオブジェクトではありません。 file_get_htmlが返すものを確認してください! – BenRoob
あなたの 'file_get_html()'関数は実行に失敗しました。 –
異なるページが動作します。 例http://en.wikipedia.org/wiki/apple – xeuy