/**
* 获取内网IP
* @return [type] [description]
*/
$host_name = exec("hostname");
$host_ip = gethostbyname($host_name); //获取本机的局域网IP
if(!$host_ip){
die('not found intranetIp');
}
return $host_ip;
/**
* 获取内网IP
* @return [type] [description]
*/
$host_name = exec("hostname");
$host_ip = gethostbyname($host_name); //获取本机的局域网IP
if(!$host_ip){
die('not found intranetIp');
}
return $host_ip;
转载于:https://my.oschina.net/colinadmin/blog/1488464