0

我尝试了很多不同的技术来加载和爬取多个 url,但它们都不起作用,我什至得到了 apache 错误。

现在我正在尝试从文件中加载 URL,但它不起作用,这里的一切对我来说都很好,所以这里是代码:

<?php
include_once('simple_html_dom.php');
$target_url = "array.htm";
$html = new simple_html_dom();
$links = $html->load_file($target_url);

foreach ($links as $link)
{
    echo $link;
}

?>

我得到的错误Warning: Invalid argument supplied for foreach() in C:\xampp2\htdocs\copy.php on line 7

4

0 回答 0