Home > Backend Development > PHP Tutorial > PHP prompts Warning: file_get_contents(): couldn't resolve_PHP Tutorial

PHP prompts Warning: file_get_contents(): couldn't resolve_PHP Tutorial

WBOY
Release: 2016-07-13 10:24:17
Original
1272 people have browsed it

php prompts Warning: file_get_contents(): couldn’t resolve

I was using a Caiji function today, and suddenly “

Warning: file_get_contents() [function.file-get-contents]: couldn't resolve host name in ……

There was no problem in the local test. I checked some information on the Internet and found that it was a DNS problem. Here’s the solution:

Use ssh to connect to linux vps and modify the dns of the vps host.

vi /etc/resolv.conf

The content inside is directly modified to:

nameserver 114.114.114.114

nameserver 8.8.8.8

Just save it, no need to restart.

Test again, OK!

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/827288.htmlTechArticlephp prompt Warning: file_get_contents(): couldn't resolve I was using a Caiji function today, and it suddenly appeared Warning: file_get_contents() [function.file-get-contents]: coul...
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