downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

socket_write> <socket_shutdown
[edit] Last updated: Fri, 23 Mar 2012

view this page in

socket_strerror

(PHP 4 >= 4.1.0, PHP 5)

socket_strerrorBir soket hatasıyla ilgili açıklamayı döndürür

Açıklama

string socket_strerror ( int $hatanum )

socket_strerror() işlevi hatanum değiştirgesinde socket_last_error() işlevinden döndürülen bir hata kodunu alır ve bununla ilgili açıklamayı döndürür.

Bilginize:

Bu işlevle ilgili sistem iletileri yerele bağlı olarak (LC_MESSAGES) gösterilse de bu eklentinin ürettiği hata iletileri İngilizce'dir.

Değiştirgeler

hatanum

socket_last_error() işlevinden dönen bir hata numarası.

Dönen Değerler

hatanum ile ilgili hata iletisini döndürür.

Örnekler

Örnek 1 - socket_strerror() örneği

<?php
if (false == ($socket = @socket_create(AF_INETSOCK_STREAMSOL_TCP))) {
   echo 
"socket_create() başarısız oldu: Sebep: " .
          
socket_strerror(socket_last_error()) . "\n";
}

if (
false == (@socket_bind($socket'127.0.0.1'80))) {
   echo 
"socket_bind() başarısız oldu: Sebep: " .
          
socket_strerror(socket_last_error($socket)) . "\n";
}
?>

Betiğin root yetkileriyle çalışmadığı varsayımıyla çıktı şöyle olurdu:

socket_bind() başarısız oldu: Sebep: Permission denied

Ayrıca Bakınız



add a note add a note User Contributed Notes socket_strerror
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites