string gethostname ( void )
用于获取主机名
它将返回成功的主机名称的字符串值,否则在失败时给出FALSE
链接:https://www.learnfk.comhttps://www.learnfk.com/php/php-function-gethostname.html
来源:LearnFk无涯教程网
<?PHP $var=gethostname(); IF ($var===FALSE) { echo "The function ran but no results were returned!"; } ELSE { echo "The function returned a value "; echo $var; } ?>
Above 示例 gives the result as follows
The function returned a value 4d623edc62d4
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)