simplehtmldom 500 error

前端 未结 1 1651
渐次进展
渐次进展 2021-01-23 13:52

I saw that there are a lot of topics on simplehtmldom, but no one\'s problem seems to be mine- specifically, that it just 500s, even on the examples provided. I\'ve found that

相关标签:
1条回答
  • 2021-01-23 14:31

    Seems like too long since you asked this question, but since I came across this trying to solve this problem myself, I thought I'd post what worked for me.

    I solved this problem by changing file_get_html to file_get_contents. Since I wanted to use the 'find' feature in simple_html_dom, I had to then convert the string to an object:

    $string = file_get_contents(http://thedeadfallproject.com/)
    $object = new simple_html_dom();
    $object->load($string); // Load HTML from a string
    
    0 讨论(0)
提交回复
热议问题