A simple IP address to get the code, but this can only be obtained to the server IP can not be used in the client Oh, there is a need for friends under reference.
| The code is as follows |
Copy Code |
|
/**
* Get the IP of the server
* @access Public
* @return String
**/
function Real_server_ip () {
static $serverip = NULL;
if ($serverip!== NULL) {
return $serverip;
}
if (Isset ($_server)) {
if (Isset ($_server[' server_addr ')) {
$serverip = $_server[' server_addr ');
}
else{
$serverip = ' 0.0.0.0 ';
}
}
else{
$serverip = getenv (' server_addr ');
}
return $serverip;
} |
http://www.bkjia.com/PHPjc/631682.html www.bkjia.com true http://www.bkjia.com/PHPjc/631682.html techarticle a simple IP address to get the code, but this can only be obtained to the server IP can not be used in the client Oh, there is a need for friends under reference. The code below copy code/** * Get service ...