显示错误信息:

curl_setopt($ch, CURLOPT_FAILONERROR, true);
print_r(curl_error($ch));
print_r(curl_getinfo($ch));