复制代码 代码如下:
$nodes = @$xpath->query("//*[@id="main_pr"]/img/@src");
$prurl = $nodes->item(0)->nodeValue;