file_get_contents won't work with target of localhost
Posted: Mon Aug 25, 2008 10:28 pm
When I request a localhost page via file_get_content(),I got this warning while other http target it's ok, like http://google.com, anyone could help? thanks a bunch:)
Warning: file_get_contents(http://127.0.0.1/t/api/uc.php?s=UIEIRQb ... SR0DN9Q%3D) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in D:\xampplite\htdocs\t\login.php on line 162
both 127.0.0.1 and localhost is malfunctioned.
Plus: the local url is working fine when I check it with my firefox.
Warning: file_get_contents(http://127.0.0.1/t/api/uc.php?s=UIEIRQb ... SR0DN9Q%3D) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in D:\xampplite\htdocs\t\login.php on line 162
both 127.0.0.1 and localhost is malfunctioned.
Plus: the local url is working fine when I check it with my firefox.