file_get_contents(): stream does not support seeking / When was PHP behavior about this changed?

后端 未结 7 1649
醉酒成梦
醉酒成梦 2020-12-06 05:00

When was PHP behavior about this changed?

From which PHP version is it?


Warning: file_get_contents(): stream does not supp

7条回答
  •  悲&欢浪女
    2020-12-06 05:19

    I had the same issue on my page when I moved it from one system to another, I was able to change the simple_html_dom.php file by removing the offset reference (didn't cause any further problems for me).

    On line 75 of simple_html_dom.php:

    $contents = file_get_contents($url, $use_include_path, $context, $offset);
    

    I removed the reference to $offset:

    $contents = file_get_contents($url, $use_include_path, $context);
    

    No my page works fine. Not taking liability for anything else it breaks! :)

提交回复
热议问题