卷曲中的问题与zend中的IP地址连接

时间:2014-08-27 09:14:20

标签: php zend-framework curl

亲爱的支持者,

   $data=array(
                                    "themeName"=>"gghg"

                            );

                    $adapter = new Zend_Http_Client_Adapter_Curl();
                    $adapter->setConfig($curlOption);

                    //instantiate the http client and add set the adapter
                    $client = new Zend_Http_Client("http://50.55.146.221/curl_page.php");
                    $client->setAdapter($adapter);

                    //add the post parameters from our config file (the authentication part)
                    $client->setParameterPost($data);

                    //perform the post, and get the response
                    $response = $client->request(Zend_Http_Client::POST);

错误:

Fatal error: Uncaught exception 'Zend_Uri_Exception' with message 'Invalid URI supplied' in /var/www/html/ursify/Source/ursify.com/library/Zend/Uri/Http.php:

我正在尝试创建客户端对象“$ client = new Zend_Http_Client ("http://50.55.146.221/curl_page.php");"

我做错了什么?帮帮我

1 个答案:

答案 0 :(得分:0)

似乎一切都很好。我已经测试了你的代码,除了cUrl调用中的超时之外没有任何错误。我用ZF 1.12.7进行了测试