PHP:有更改请求地址的方法吗? [英] PHP: Is there a way to change request address?

查看:133
本文介绍了PHP:有更改请求地址的方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种原因,如果我使用以下网址请求文件:

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?

谢谢

推荐答案

听起来您的浏览器配置的代理配置错误。

Sounds like your browser has the proxy configured wrong.

Aka无代理应包含localhost AND 127.0.0.1

Aka "No proxy for" should contain localhost AND 127.0.0.1

这篇关于PHP:有更改请求地址的方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆