Home  >  Article  >  Backend Development  >  $_SERVER['LOCAL_ADDR']和$_SERVER['SERVER_ADDR']是什么错误?

$_SERVER['LOCAL_ADDR']和$_SERVER['SERVER_ADDR']是什么错误?

WBOY
WBOYOriginal
2016-06-13 09:58:492503browse

$_SERVER['LOCAL_ADDR']和$_SERVER['SERVER_ADDR']是什么东东??
在某一网站程序的php文件中看到这段代码:$md5str = (((('EHTAZIYT'.$ep).$_SERVER['SERVER_ADDR']).$_SERVER['LOCAL_ADDR']).'22.90h7^aaz0(!skZnmLa03#nVAc_f(h-a!)wsx~9dlP1%uXJnB8.65E3zYYwa');可我运行到些段代码时老是会停下来,弹出如下错误信息Notice: Undefined index。指示$_SERVER['LOCAL_ADDR']和$_SERVER['SERVER_ADDR']为无效变量。请问:$_SERVER['LOCAL_ADDR']和$_SERVER['SERVER_ADDR']到底是什么东西,我查php手册也没查出,可这段代码却出现在商业程序中,已经过数年的运行检验,不应该是错误的。
请知道的兄弟姐妹们能解答下。

------解决方案--------------------
“SERVER_ADDR” 
当前运行脚本所在的服务器的 IP 地址。 
“REMOTE_ADDR” 
正在浏览当前页面用户的 IP 地址。
LOCAL_ADDR不晓得是啥,估计是自己加进去的
------解决方案--------------------
$_SERVER['LOCAL_ADDR'] 在PHP5中已经没有了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn