getmxrr无法在Windows中运行

时间:2016-06-29 13:08:50

标签: php dns php-7

我正在使用这个简单的代码

getmxrr("google.com", $res);
var_dump($res);

在Windows中,我收到null

在Ubuntu上,我得到了:

array(5) {
  [0] =>
  string(23) "alt4.aspmx.l.google.com"
  [1] =>
  string(18) "aspmx.l.google.com"
  [2] =>
  string(23) "alt3.aspmx.l.google.com"
  [3] =>
  string(23) "alt1.aspmx.l.google.com"
  [4] =>
  string(23) "alt2.aspmx.l.google.com"
}

两者都使用PHP 7.0.x

0 个答案:

没有答案