To the prev. note: **NEVER USE***
#`sudo hostname servername`
Some *nix systems will then force to set the 'servername' as new hostname!
(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 değiştirgesi 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
?>
To the prev. note: **NEVER USE***
#`sudo hostname servername`
Some *nix systems will then force to set the 'servername' as new hostname!
On Linux, use the command `hostname` to view your host name, or `sudo hostname servername` to set it