php程序突然不能用file_get_contents()访问远程网址了?
2014-07-21 15:53
363 查看
php程序用file_get_contents("http://www.***.com"),一直以来好好的,突然间就不能链接远程网址了,在shell下可以ping通远程网址,可是用php的file_get_contents()或者php的curl()函数就不能访问了,而是莫名把远程网址解析成本地127.0.0.1的地址了。 我修改/etc/hosts把远程网址的ip直接写进去,又正常了。 这是什么原因啊? |
相关文章推荐
- PHP下通过file_get_contents()方法不能正常获取远程网页内容
- PHP中file_get_contents、fp_open等不能使用!
- 解析PHP中的file_get_contents获取远程页面乱码的问题
- php远程抓取函数curl(),file_get_contents
- PHP下通过file_get_contents\curl的方法实现获取远程网页内容(别忘了还有PhpRPC)
- windows nginx使用file_get_contents、fopen、curl访问php文件造成阻塞的解决办法
- PHP的file_get_contents获取远程页面乱码的问题
- 用file_get_contents抓取远程网址内容
- 解析PHP中的file_get_contents获取远程页面乱码的问题【转】
- 【php】PHP远程读取大文件之file_get_contents()与readfile()效率比较
- 解析PHP中的file_get_contents获取远程页面乱码的问题
- PHP-CGI 进程 CPU 100% 与 file_get_contents 函数的关系
- PHP内置访问资源的超时时间 time_out file_get_contents read_file
- PHP-CGI 进程 CPU 100% 与 file_get_contents 函数的关系
- PHP-CGI 进程 CPU 100% 与 file_get_contents 函数的关系
- php增强file_get_contents的兼容性
- PHP下通过file_get_contents的代理使用方法
- PHP-CGI 进程 CPU 100% 与 file_get_contents 函数的关系
- php中使用Curl、socket、file_get_contents三种方法POST提交数据
- PHP利用Curl、socket、file_get_contents POST数据