array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.curl-errno.php', 1 => 'curl_errno', ), 'up' => array ( 0 => 'ref.curl.php', 1 => 'cURL İşlevleri', ), 'prev' => array ( 0 => 'function.curl-copy-handle.php', 1 => 'curl_copy_handle', ), 'next' => array ( 0 => 'function.curl-error.php', 1 => 'curl_error', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/curl/functions/curl-errno.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.0.3, PHP 5, PHP 7, PHP 8)
curl_errno — Belirtilen oturumdaki son hatanın kodunu döndürür
Belirtilen oturumdaki son hatanın numarasını döndürür.
Bir hata yoksa 0, varsa hatanın kodunu döndürür.
Sürüm: | Açıklama |
---|---|
8.0.0 | tanıtıcı için artık bir
CurlHandle örneği bekleniyor; evvelce,
resource türünde bir değer beklenirdi. |
Örnek 1 - curl_errno() örneği
<?php
// Olmayan bir yer için bir cURL tanıtıcısı oluşturalım
$ct = curl_init('http://404.php.net/');
curl_setopt($ct, CURLOPT_RETURNTRANSFER, true);
if(curl_exec($ct) === false)
{
echo 'Curl hatası: ' . curl_error($ct);
}
// Tanıtıcıyı kapatalım
curl_close($ct);
?>