English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
(PHP 5 >= 5.5.0)
curl_multi_setopt — エラーコードを説明する文字列テキストを返します。
string curl_multi_strerror ( int $errornum )
CURLM エラーコードを説明する文字列テキストを返します。
errornum
CURLM エラーコード の定数のいずれかです。
エラーコードを説明する文字列テキストを返します。それ以外の場合、NULLを返します。
<?php // CURLハンドルを创建 $ch1 = curl_init("https:");//ja.oldtoolbag.com/"); $ch2 = curl_init("http:");//php.net/"); // バッチCURLハンドルを作成 $mh = curl_multi_init(); // バッチ処理ハンドルにハンドルを追加 curl_multi_add_handle($mh, $ch1); curl_multi_add_handle($mh, $ch2); // バッチ処理ハンドルを実行 do { $status = curl_multi_exec($mh, $active); // エラーチェック if($status > 0) { // エラーメッセージを表示 echo "ERROR!\n " . curl_multi_strerror($status); } } while ($status === CURLM_CALL_MULTI_PERFORM || $active); ?>