$html = file_get_contents("https://www.[URL].com");
echo $html;
在错误日志中产生此:
PHP警告:file_get_contents(https:// www。[URL] .com)[function.file-get-contents]:无法打开流:HTTP请求失败!第13行的/Applications/MAMP/htdocs/test.php中的HTTP / 1.1 500 Internal Server Error;
但是,该网站可以在浏览器中正常运行。
我也尝试使用cURL。我在日志文件中没有任何错误,但是$html现在回显:
“ /”应用程序中的服务器错误。
你调用的对象是空的。
...一些更多的调试信息
任何想法如何解决这个问题?