对此代码有何想法:
$doc = new DOMDocument();
$doc->loadHTMLFile('https://gpwcatalyst.pl/ajaxindex.php?action=BSInstrument&start=listFull&lang=PL&format=html&download_xls=1&bsi_instrument=OKR,OKM,LZH,LZP,OSP,OPD&bsi_rodzaj=N¤cies=PLN&table_order=');
echo $doc->saveHTML();在本地主机上工作正常,但在服务器上不工作,并给出以下警告:
警告: PHP :未能打开流:在第14行的/test.php中连接超时
警告: PHP启动: I/O警告:在第14行的https://gpwcatalyst.pl/ajaxindex.php?action=BSInstrument&start=listFull&lang=PL&format=html&download_xls=1&bsi_instrument=OKR,OKM,LZH,LZP,OSP,OPD&bsi_rodzaj=N¤cies=PLN&table_order=中加载外部实体“/test.php”失败
第14行是$doc->loadHTMLFile('https://...
我应该在哪里寻找解决办法?
谢谢
发布于 2022-01-22 13:03:19
我觉得你的服务器解决不了那个主机。因此,如果您有ssh,可以使用ping或curl -L命令来检查它。如果您没有ssh,则可以创建一个PHP CURL脚本来检查它。
https://stackoverflow.com/questions/70811942
复制相似问题