gpt4 book ai didi

php - DOMDocument loadHTMLFile 总是返回 false

转载 作者:搜寻专家 更新时间:2023-10-31 21:23:19 25 4
gpt4 key购买 nike

下面是代码,我在这里遗漏了什么

$doc = new DOMDocument();
// this has file permission 644 previously, and changed to 755
$doc->loadHTMLFile('http://gartneryrket.no/digitalemagasiner/resources/uploads/releases/zipfiles/1484716981/index.html');
// same code is working in another site
// when I specify path not url then its working

最佳答案

使用如下路径:

/home/gartneryrket/public_html/digitalemagasiner/resources/uploads/releases/zipfiles/1484716981/index.html

它对我有用。

关于php - DOMDocument loadHTMLFile 总是返回 false,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41712810/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com