Weird error using PHP Simple HTML DOM parser

前端 未结 9 1419
梦谈多话
梦谈多话 2020-11-29 10:30

I am using this library (PHP Simple HTML DOM parser) to parse a link, here\'s the code:

function getSemanticRelevantKeywords($keyword){
    $results = array(         


        
9条回答
  •  暖寄归人
    2020-11-29 11:16

    This error usually means that $html isn't an object.

    It's odd that you say this seems to work. What happens if you output $html? I'd imagine that the url isn't available and that $html is null.

    Edit: Looks like this may be an error in the parser. Someone has submitted a bug and added a check in his code as a workaround.

提交回复
热议问题