我需要连接以获得codeigniter的响应。我使用库https://github.com/robertstaddon/GetResponse-PHP-Wrapper/blob/master/PHPwrapper/GetResponseAPI.class.php
我的conteroller是:
class GetResponse extends CI_Controller {
function __construct() {
parent::__construct();
$params = array('$apiKey'=>'f19198cd268a8cf931ad5c7266673138') ;
$this->load->library('GetResponseAPI',$params,'api');
}
public function index()
{
//Connection Testing
$ping = $this->api->ping();
$data['ping'] = $ping;
$this->load->view('getResponse/test',$data);
}
}
我得到的是:
遇到PHP错误
严重性:用户错误
消息:API调用失败。服务器返回状态码204
文件名:libraries / GetResponseAPI.php
行号:326
回溯:
文件:C:\ projects \ funnels \ application \ libraries \ GetResponseAPI.php 行:326功能:trigger_error
文件:C:\ projects \ funnels \ application \ libraries \ GetResponseAPI.php 行:68功能:执行
文件:C:\ projects \ funnels \ application \ controllers \ GetResponse.php 行:25函数:getAccountInfo
文件:C:\ projects \ funnels \ index.php行:292功能:require_once