douxiangbiao1899 2012-02-09 21:57
浏览 1507
已采纳

为什么$ _SERVER ['REMOTE_ADDR']返回127.0.0.1

I am editing a remote server, and for some reason it is returning 127.0.0.1, I tried it on my iPhone too and it did the same thing.

echo $_SERVER['REMOTE_ADDR']; // returns 127.0.0.1
  • 写回答

4条回答 默认 最新

  • drazvzi741287 2012-02-09 22:01
    关注

    It mean that the client who execute the script is hosted on local host.

    Could be because the script that contain $_SERVER['REMOTE_ADDR'] is called with a CURL request from another script on the same server.

    Could also be because of a proxy system.

    Possible indirect duplicate of Using Django, why would REMOTE_ADDR return 127.0.0.1 on a web server?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 vc6.0中想运行代码的时候总是提示无法打开文件是怎么回事
  • ¥25 关于##爬虫##的问题,如何解决?:
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题