$SERVER["REMOTEADDR"]
errorreporting (EERROR | EWARNING | EPARSE);
if($HTTPSERVERVARS["HTTPXFORWARDEDFOR"]){
$ip = $HTTPSERVERVARS["HTTPXFORWARDEDFOR"];
}
elseif($HTTPSERVERVARS["HTTPCLIENTIP"]){
$ip = $HTTPSERVERVARS["HTTPCLIENTIP"];
}
elseif ($HTTPSERVERVARS["REMOTEADDR"]){
$ip = $HTTPSERVERVARS["REMOTEADDR"];
}
elseif (getenv("HTTPXFORWARDEDFOR")){
$ip = getenv("HTTPXFORWARDEDFOR");
}
elseif (getenv("HTTPCLIENTIP")){
$ip = getenv("HTTPCLIENTIP");
}
elseif (getenv("REMOTEADDR")){
$ip = getenv("REMOTEADDR");
}
else{
$ip = "Unknown";
}
好怪!不管用哪種
我的IP都會顯示 ::1
怎麼會這樣?
我看xampp的LOG寫
Starting ProFTPD...
Exit code: 8
Stdout:
Checking syntax of configuration file
proftpd config test fails, aborting
Stderr:
xxx-2.local proftpd[1549]: warning: unable to determine IP address of 'xxx-2.local'
xxx-2.local proftpd[1549]: error: no valid servers configured
xxx-2.local proftpd[1549]: Fatal: error processing configuration file '/Applications/XAMPP/xamppfiles/etc/proftpd.conf'
整個壞掉了
我也不知道是什麼原因?根本沒有動到呀