2009-01-02 66 views
1

我使用Zend_Rest_Client連接Zend_Rest_Server錯誤,似乎一切都還好吧,但是當我試圖獲得()從服務器我收到此錯誤:Zend_Rest_Client - 在localhost

Zend_Http_Client_Adapter_Exception: Unable to Connect to tcp://localhost:80. Error #10060: 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\zf_1_72\library\Zend\Http\Client\Adapter\Socket.php on line 148

這裏是代碼,我用

$client = new Zend_Rest_Client('http://localhost/my_application/api/index/');  
$client->auth($key); 
$result = $client->get(); 

感謝的任何意見

回答

3

This thread suggetss問題可能與「localhost」的名字 - 嘗試使用127.0.0.1代替。