PHP: Is there a way to change request address?

被刻印的时光 ゝ 提交于 2019-12-10 19:21:24

问题


For some reason, if I request a file using a url such as this:

http://localhost/proxy.php?url=http://anintranetsite/file.jpg

It works! I can get the file. But if I use,

http://127.0.0.1/proxy.php?url=http://anintranetsite/file.jpg

I cannot get it to work. I am not unnderstanding what is going on... Any thoughts on what could be going wrong?

Thanks


回答1:


Sounds like your browser has the proxy configured wrong.

Aka "No proxy for" should contain localhost AND 127.0.0.1




回答2:


sounds like a router/firewall problem. localhost is probably aliased to your machine name rather than 127.0.0.1



来源:https://stackoverflow.com/questions/1535215/php-is-there-a-way-to-change-request-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!