PHP Simple HTML DOM, Notice: Trying to get property of non-object

谁说我不能喝 提交于 2019-12-23 15:53:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!