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
WBOYOriginal
2016-07-13 10:24:171282browse

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...
Statement:
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