我正在使用 admin-ajax 在我的插件中进行 ajax 调用。因此,当出现错误时,我收到错误“内部服务器错误”而不显示错误。我看不到日志,因为我无权访问服务器?我试过这样:
try{
$req = new WP_Http;
//$headers = array('Transfer-Encoding'=> 'chunked');
$res = $req->request("url", array('method' => "POST", 'body' => $data) );
//Getting error at this line when size of $daya is more than 10MB. Till 10MB, it is sending post data successfully.
//After 10MB(approx), getting Internal server error.
//But cant just think this is server restriction to max post data, as phpinfo saying that max_post_size as 64MB
}
catch(Exception $e){
echo $e;
}
但它仍然返回错误而不返回结果。我知道发生错误的行,但想知道错误是什么。