rest api(客户端)在本地服务器上运行良好,但在在线服务器上运行不正常

rest api (client side) is working fine on local server but not on online server

以下代码在本地服务器上运行良好,但在在线服务器上会抛出 HTTP ERROR 500。 cURL 也已启用。检查了它说的错误日志;

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught exception 'Pph\ApiClientException' with message 'Unknown error 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>";

必须提供一个(human、phpserialize、json)作为 URL 参数,如下所示:&format=phpserialize\n)\n'

示例: $tcom = $ApiClient->apiCall('get', 'companies&format=phpserialize');