The following code works fine on local server but on online server throws HTTP ERROR 500
. cURL is also enable. Have checked the error log it say;
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>";
Have to provide one (human, phpserialize, json) as URL parameter like this: &format=phpserialize\\n)\\n'
Example: $tcom = $ApiClient->apiCall('get', 'companies&format=phpserialize');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.