东台市幼儿园,小小说网,保定学院地址
php的自带checkdnsrr函数只在linux平台有效。使用惯了在window平台不能使用的话给兼容性带来麻烦。
因此写了个checkdnsrr模拟函数在window平台环境使用。
if (!function_exists('checkdnsrr ')) { function checkdnsrr($host, $type) { if(!empty($host) && !empty($type)) { @exec('nslookup -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host), $output); foreach ($output as $k => $line) { if(eregi('^' . $host, $line)) { return true; } } } return false; } }
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
PHP date_default_timezone_set()设置时区操作实例分析
网友评论