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

gethostname

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

定义和用法

gethostname() 函数返回返回本地机器的主机名。

实例

一个 gethostname() 示例:

<?php
echo gethostname();
?>

语法

gethostname()
同类函数
  • 将打包的Internet地址转换为人类可读的表示形式 inet_ntop

    inet_ntop

    将打包的Internet地址转换为人类可
  • 将人类可读的IP地址转换为其压缩的in_addr表示形式 inet_pton

    inet_pton

    将人类可读的IP地址转换为其压缩的in_
  • 获取/设置响应的 HTTP 状态码 http_response_code

    http_response_code

    获取/设置响应的HTTP状态码
  • checkdnsrr的别名 dns_check_record

    dns_check_record

    checkdnsrr的别名
  • 将 IPV4 的字符串互联网协议转换成长整型数字 ip2long

    ip2long

    将IPV4的字符串互联网协议转换成长整型
  • 删除之前设置的 HTTP 头 header_remove

    header_remove

    删除之前设置的HTTP头
  • 获取互联网主机名对应的 MX 记录 getmxrr

    getmxrr

    获取互联网主机名对应的MX记录
  • 关闭系统日志链接 closelog

    closelog

    关闭系统日志链接
热门文章