我收到此错误消息:
在safe_mode或设置了open_basedir时,无法激活CURLOPT_FOLLOWLOCATION.
safe_mode在我的网络托管上关闭.
open_basedir是"".
我该如何解决这个问题?
编辑这篇文章,我认为我的问题被解释错了:
我希望我的php页面可以从任何页面下载HTML代码,我实际上可以期待一个," http://www.lolnexus.com/ "并且我制作了这段代码
$nexus= file_get_contents('http://www.lolnexus.com/');
$myFile = "nexus.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
fwrite($fh, $nexus);
fclose($fh);
Run Code Online (Sandbox Code Playgroud)
结果是:这个
<html><head><title>Object moved</title></head><body>
Run Code Online (Sandbox Code Playgroud)
如果我将我的网址更改为其他网页,它工作正常.....
谢谢阅读