请输入您要查询的百科知识:

 

词条 mysql_get_host_info
释义

mysql_get_host_info

(PHP 4 >= 4.0.5, PHP 5)

mysql_get_host_info -- 取得 MySQL 主机信息

说明

string mysql_get_host_info ( [resource link_identifier] )

mysql_get_host_info() 返回一个字符串说明了连接 link_identifier 所使用的连接方式,包括服务器的主机名。如果省略 link_identifier,则使用上一个打开的连接。

例子

<?php

mysql_connect("localhost", "mysql_user", "mysql_password") or

die("Could not connect: " . mysql_error());

printf ("MySQL host info: %s\", mysql_get_host_info());

?>

以上例子将产生如下输出:

MySQL host info: Localhost via UNIX socket

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/5 2:40:08