array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.gethostname.php', 1 => 'gethostname', ), 'up' => array ( 0 => 'ref.network.php', 1 => 'Ağ İşlevleri', ), 'prev' => array ( 0 => 'function.gethostbynamel.php', 1 => 'gethostbynamel', ), 'next' => array ( 0 => 'function.getmxrr.php', 1 => 'getmxrr', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/network/functions/gethostname.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
gethostname — Konak ismini döndürür
gethostname() işlevi yerel makinenin standard konak ismini döndürür.
Bu işlevin bağımsız değişkeni yoktur.
Başarısızlık durumunda false
. aksi takdirde konak ismini bir dizge olarak
döndürür.
Örnek 1 - gethostname() örneği
<?php
echo gethostname(); // çıktısı şu olabilir: posta
?>