近期发现本机的localhost不好用了. 症状: 自己本机部署服务器时,浏览器地址栏访问localhost:8080不通: 禁用网络连接,未果: 拔出网线,OK. cmd里ping之,返回结果如下: C:\Documents and Settings\Administrator>ping localhost Pinging WWW-C4AB43513BE [::1] with 32 bytes of data: Reply from ::1: time<1ms Reply from ::1:…
虽然可以在浏览器中正常访问http://localhost但用file,file_get_contents等函数打开http://localhost异常.用127.0.0.1也可以打开,本地hosts指向也正常,尝试ping localhost结果返回的是::1,推测不是httpd和php的配置问题,是php不能识别::1所致 >ping localhost reply from ::1: times<1ms reply from ::1: times<1ms reply from ::…