当前位置: 首页> 函数类别大全> gethostname

gethostname

获取主机名
名称:gethostname
分类:网络Network
所属语言:php
一句话介绍:返回主机名。

实例

一个 gethostname() 示例:

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">gethostname</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>
同类函数
  • 获取主机名 gethostname

    gethostname

    获取主机名
  • 检查与给定Internet主机名或IP地址对应的DNS记录 checkdnsrr

    checkdnsrr

    检查与给定Internet主机名或IP地
  • 获取指定的IP地址对应的主机名 gethostbyaddr

    gethostbyaddr

    获取指定的IP地址对应的主机名
  • stream_get_meta_data的别名 - 从封装协议文件指针中取得报头/元数据 socket_get_status

    socket_get_status

    stream_get_meta_data
  • 将长整型转化为字符串形式带点的互联网标准格式地址(IPV4) long2ip

    long2ip

    将长整型转化为字符串形式带点的互联网标准
  • 获取互联网主机名对应的 IPv4 地址列表 gethostbynamel

    gethostbynamel

    获取互联网主机名对应的IPv4地址列表
  • 获取与 Internet 服务和协议关联的端口号 getservbyname

    getservbyname

    获取与Internet服务和协议关联的端
  • 删除之前设置的 HTTP 头 header_remove

    header_remove

    删除之前设置的HTTP头