问题
I am getting Notice: Trying to get property of non-object
at:
$var = trim($article->find('span[id$=qty]', 0)->innertext);
$article is a simple_html_dom()
object.
回答1:
Maybe span[id$=qty]
evaluates to null; means: no node was found.
来源:https://stackoverflow.com/questions/6003991/php-simple-html-dom-notice-trying-to-get-property-of-non-object