【问题标题】:Unable to Connect error with Zend_Rest_Client on localhost本地主机上的 Zend_Rest_Client 无法连接错误
【发布时间】:2010-09-29 06:04:21
【问题描述】:

我正在使用Zend_Rest_Client 连接Zend_Rest_Server,一切似乎都很好,但是当我尝试从服务器上连接get() 时,我收到了这个错误:

Zend_Http_Client_Adapter_Exception: 无法连接到 tcp://localhost:80。错误 #10060:A 连接尝试失败,因为 关联方没有正确 一段时间后回复,或 建立连接失败,因为 连接的主机未能响应。 在 C:\www\zf_1_72\library\Zend\Http\Client\Adapter\Socket.php 在第 148 行

这是我使用的代码

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

谢谢你的建议

【问题讨论】:

    标签: php zend-framework localhost zend-rest


    【解决方案1】:

    This thread 建议问题可能出在“localhost”名称上 - 请尝试改用 127.0.0.1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-22
      • 2018-03-05
      • 1970-01-01
      • 2017-12-24
      • 2014-11-06
      • 1970-01-01
      • 2012-01-23
      相关资源
      最近更新 更多