nginx+php5.3.20, file_get_contents cannot be used

Source: Internet
Author: User
nginx+php5.3.20, file_get_contents can't use, help
File_get_contents the URL of the extranet is completely fine, but if you want to get a native URL (such as http://localhost/index.php), the following error will be reported:
A connection attempt failed because the connected party does not properly respond after a period of time, or established CO Nnection failed because connected host have failed to respond) while reading response headers 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 "
Found an article on the internet, http://www.codesky.net/article/201106/174247.html but do not know how to operate under Windows, or there are other ways to help


------Solution--------------------
Modify hosts to get a domain name resolved to local
Using domain name access can be solved.
or a direct IP address try it out.
------Solution--------------------
Check the php.ini, is not allow_url_fopen = 1?
Also try to replace file_get_contents with include to get the page for localhost.
------Solution--------------------
Have the same problem.
Compared to other people, the feeling is
The question of this,
Mark waits for the master

  • 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.