我有一个 codeigniter 应用程序,它通过 authorize.net 有一个结帐系统。我使用的 authorize.net 库执行 curl 进行付款,但完成后我无法重定向,因为
headers already sent by (output started at /Users/phil/Sites/Medbridge/httpdocs/application/libraries/AuthorizeCimLib.php:1
这就是日志所说的。如果我注释掉付款的东西,它会重定向罚款。我不知道我是否不了解卷曲,这就是它正在做某事的原因,或者我是否需要更改一些卷曲设置。
谢谢
编辑
这是我正在使用的库的链接,它很大,不想重新发布整个代码
http://www.communitymx.com/content/article.cfm?page=4&cid=FDB14
这是卷曲部分,也许有人可以看到这是否正在向标题输出
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLINFO_HEADER_OUT, FALSE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_xml);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$this->_response = curl_exec($ch);
谢谢