0

我有一个示例代码:

include('simple_html_dom.php');
$url = 'http://api.nrelate.com/mpw_wp/0.51.4/?tag=nrelate_popular&domain=dongcam.vn&url=http%3A%2F%2Fdongcam.vn%2Ft10041&maxageposts=4320&nr_div_number=2&increment=1';
$html = file_get_html($url);
// find all span tags with class=nr_post_title
foreach($html->find('span.nr_post_title') as $e)
    echo $e->innertext . '<br>';

=> 错误无法获得标题<span class=\"nr_post_title\">,如何解决?

4

0 回答 0