php程序忽然不能用file_get_contents()訪問遠程網址了?

php程序用file_get_contents("http://www.***.com"),一直以來好好的,忽然間就不能連接遠程網址了,在shell下能夠ping通遠程網址,但是用php的file_get_contents()或者php的curl()函數就不能訪問了,而是莫名把遠程網址解析成本地127.0.0.1的地址了。我修改/etc/hosts把遠程網址的ip直接寫進去,又正常了。這是什麼緣由啊?
相關文章
相關標籤/搜索