📅  最后修改于: 2022-03-11 14:54:41.746000             🧑  作者: Mango
curl_setopt($handle, CURLOPT_VERBOSE, true);
$verbose = fopen('php://temp', 'w+');
curl_setopt($handle, CURLOPT_STDERR, $verbose);
$result = curl_exec($handle);
if ($result === FALSE) {
printf("cUrl error (#%d): %s
\n", curl_errno($handle),
htmlspecialchars(curl_error($handle)));
}
rewind($verbose);
$verboseLog = stream_get_contents($verbose);
echo "Verbose information:\n", htmlspecialchars($verboseLog), "
\n";