Home > Backend Development > PHP Tutorial > 服务器中DNS的问题

服务器中DNS的问题

WBOY
Release: 2016-06-06 20:36:29
Original
2452 people have browsed it

公司从联通申请了固定的IP,然后在自己的机房架设一台网站服务器,这个服务器需要自己的DNS才能上网,在服务器(centos)上配置了DNS后,网站访问没有问题.
但是我在这台服务器上一用到file_get_contents之类的方法,就会报错误

<code>PHP Warning:  file_get_contents():  
php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolutin 
</code>
Copy after login
Copy after login

基本确定是DNS的问题吧!这个问题要怎么解决?去找联通?

回复内容:

公司从联通申请了固定的IP,然后在自己的机房架设一台网站服务器,这个服务器需要自己的DNS才能上网,在服务器(centos)上配置了DNS后,网站访问没有问题.
但是我在这台服务器上一用到file_get_contents之类的方法,就会报错误

<code>PHP Warning:  file_get_contents():  
php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolutin 
</code>
Copy after login
Copy after login

基本确定是DNS的问题吧!这个问题要怎么解决?去找联通?

restart Apache after modify /etc/resolve.conf

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template