File_get_contents cannot be used on nginx + php5.3.20.

Source: Internet
Author: User
In nginx + php5.3.20, file_get_contents cannot be used. for help, the file_get_contents Internet url is okay, but if you want to obtain the local url (such as http: // localhost/index. php), the following error will be reported: A & nbsp; connectio nginx + php5.3.20, file_get_contents cannot be used.
File_get_contents Internet url is completely OK, but if you want to obtain the local url (such as http: // localhost/index. php), the following error will be reported:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 124.2xx.xxx.xxx, server: www.xxx.com, request: "GET/index. php HTTP/1.0 ", upstream:" fastcgi: // 127.0.0.1: 9000 ", host:" www.xxx.com"
I found such an article on the Internet, http://www.codesky.net/article/201106/174247.html but I do not know how to operate in the Windows, or there are other ways, help

------ Solution --------------------
Modify hosts to resolve a domain name to a local host
You can solve this problem by using domain name access.
Or you can directly view the IP addresses in the region.
------ Solution --------------------
Check if allow_url_fopen = 1 in php. ini?
In addition, try to replace file_get_contents with include to get the localhost page.
------ Solution --------------------
Also encountered the same problem
Compared with others, it seems that
This problem,
Mark expert

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.