simple_html_dom
さまざまなメソッドを持つ事前定義されたwebcrawlerクラスであるwhichを使用しています。
私は次のものを持っています:
$html = new simple_html_dom();
$arrayoflinks = //this is where I have a list of links//;
foreach($arrayoflinks as $eachlink){
$html->load_file($eachlink); //these are methods from the simple html_dom
$html->find('a'); //these are methods from the simple html_dom
//run a function I already wrote
}
問題は$html
、foreach
ループ内が認識されていないことです。私のNetbeansIDEは$html
、foreach
ループ内で新しい変数が導入されていることを通知しています。これは、クラスメソッドとして認識されていないことを暗黙的に意味します。
どうすればこれを回避できますか?
編集:エラーは別のものであることが判明しました。上記のforeachループのメソッドへのアクセスは有効です。