以下代码在本地服务器上运行正常但在联机服务器上抛出HTTP ERROR 500
。 cURL也启用了。检查了它说的错误日志;
AH01071:收到错误'PHP消息:PHP致命错误:未捕获异常 'Pph \ ApiClientException',消息'未知错误HTTP / 1.1 400 BAD REQUEST \ r \ NSE
$tcom = $ApiClient->apiCall('get', 'companies');
echo "<table>";
foreach($tcom as $key=>$value){
foreach($value as $k => $v){
echo'<tr>';
echo '<td>' . $k . '</td>';
echo '<td>' . $v . '</td>';
echo '</tr>';
}
}
echo "</table>";
答案 0 :(得分:0)
必须提供一个(human,phpserialize,json)作为URL参数,如下所示:&amp; format = phpserialize \ n)\ n&#39;
实施例: $ tcom = $ ApiClient-&gt; apiCall(&#39; get&#39;,&#39;公司&amp; format = phpserialize&#39;);