【发布时间】:2023-03-27 16:06:01
【问题描述】:
我只想得到span的值
这是我的代码:
<?php
include('simple_html_dom.php');
$html = file_get_html('https://ru.investing.com/commodities/gold');
echo $html->find("span[class=arial_26 inlineblock pid-8830-last]",0)->plaintext;
?>
这是我的错误:
Fatal error: Uncaught Error: Call to a member function find() on bool in /home/f0514538/domains/f0514538.xsph.ru/public_html/test/crypto/tovar/gold.php:6 Stack trace: #0 {main} thrown in /home/f0514458/domains/f0514458.xsph.ru/public_html/test/crypto/tovar/gold.php on line 6
【问题讨论】:
标签: php html parsing frameworks simple-html-dom