Hello, I have problem with file_get_contents() in my localhost.
When i try
echo file_get_contents('http://localhost/index.php'); // it output error of
Warning: file_get_contents(http://localhost/index.php) [function.file-get-contents]: failed to open stream: 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. in C:\\www\\Apache2\\htdocs\ est.php on line 2
// but when i try
echo file_get_contents('http://www.google.com/') // it works
my http://localhost/index.php just content a string “<h1> It works</h1>”
Does anybody know why ? I thought my firewall is blocking the connection, so when I disabled my firewall, it still not working. Thanks for any of your help.