使用file_get_contents或fopen调用url文件空白是什么问题?
$feicuixml = file_get_contents ( "http://www.jadewd.com/forum-rss-fid-4-auth-0.html", "r" )or exit("Unable to open file!");
$feicuixml = file_get_contents ( "test.xml", "r" );
print_r( $feicuixml);
上面代码放在本地都可以执行,但是在服务器上却无法执行第一行代码,也无报错,返回Unable to open file!
服务器禁用了
phpinfo,passthru,exec,shell_exec,system,popen,proc_open,pcntl_exec,escapeshellcmd,proc_get_status,proc_nice,proc_terminate
这些函数我也在本地禁用后发现都是可以调取url的
服务器的allow_url_fopen也是on的
Array( => Array ( => 1 => 1 => 4 ))
转用curl来代替file_get_contents依然无效,请问这是服务器上什么问题呢?
求指教啊:Q 我也碰到过同样的问题,有可能是链接建立的响应时间不够长,你可以把响应时间加长点看看。
页:
[1]