English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
(PHP 5 >= 5.5.0)
curl_multi_setopt — Returns a string text describing the error code.
string curl_multi_strerror ( int $errornum )
Returns a string text describing the CURLM error code.
errornum
CURLM Error Codes one of the constants.
Returns a string text describing the error code, otherwise returns NULL.
<?php // Create CURL handle $ch1 = curl_init("https:\/\/"//www.oldtoolbag.com/"); $ch2 = curl_init("http:\/\/"//php.net/"); // Create a batch CURL handle $mh = curl_multi_init(); // Add handle to batch handle curl_multi_add_handle($mh, $ch1); curl_multi_add_handle($mh, $ch2); // Execute batch handle do { $status = curl_multi_exec($mh, $active); // Check for errors if($status > 0) { // Display error information echo "ERROR!\n " . curl_multi_strerror($status); } } while ($status === CURLM_CALL_MULTI_PERFORM || $active); ?>