把simple_html_dom批量替换为CI_Simple_html_dom。
放置在application\libraries下:
function index()
{
//$this->load->view('welcome_message');
$this->load->library('Simple_html_dom');
$html = file_get_html('http://localhost/test.htm');
foreach($html->find('a') as $e)
echo $e->href . '
';
}
下一篇:利用PHP怎么根据元素值删除元素