标签:
<?php $res=system("ipconfig -all"); $contents=trim(ob_get_clean()); $contents=str_replace("\r\n","",$contents); $contents=explode(" ",$contents); foreach($contents as $k=>&$v) { $pre=substr($v,0,8); if($pre=="物理地址") { $ip=substr($v,36); break; } } var_dump($ip); ?>
标签:
原文地址:http://www.cnblogs.com/lizhaoyao/p/5233889.html