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

search for in the

getmxrr> <gethostbynamel
Last updated: Fri, 13 Nov 2009

view this page in

gethostname

(PHP >= 5.3.0)

gethostnameホスト名を取得する

説明

string gethostname ( void )

gethostname() 関数は、ローカルのマシンに設定されている標準的なホスト名を取得します。

返り値

成功時にはホスト名を示す文字列。失敗時には FALSE を返します

例1 簡単な gethostname() 関数の使用例

<?php
echo gethostname(); // may output e.g,: sandie
?>

参考

  • gethostbyname() - インターネットホスト名に対応するIPv4アドレスを取得する



add a note add a note User Contributed Notes
gethostname
jonasschaub at gmail dot com
07-Jul-2009 05:32
may help you with <5.3 :
php_uname('n');

getmxrr> <gethostbynamel
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites