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

search for in the

mysql_get_proto_info> <mysql_get_client_info
Last updated: Fri, 22 Aug 2008

view this page in

mysql_get_host_info

(PHP 4 >= 4.0.5, PHP 5, PECL mysql:1.0)

mysql_get_host_infoObtener información de la máquina anfitriona MySQL

Descripción

string mysql_get_host_info ([ resource $id_enlace ] )

Describe el tipo de conexión en uso, incluyendo el nombre del equipo servidor anfitrión.

Lista de parámetros

link_identifier

The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect() is assumed. If no such link is found, it will try to create one as if mysql_connect() was called with no arguments. If by chance no connection is found or established, an E_WARNING level error is generated.

Valores retornados

Devuelve una cadena que describe el tipo de conexión MySQL en uso, o FALSE si ocurre un error.

Ejemplos

Example #1 Ejemplo de mysql_get_host_info()

<?php
$enlace 
mysql_connect("localhost""mysql_user""mysql_password");
if (!
$enlace) {
    die(
"No pudo conectarse: " mysql_error());
}
printf("Informaci&oacute;n del host MySQL: %s\n"mysql_get_host_info());
?>

El resultado del ejemplo seria algo similar a:

Informaci&oacute;n del equipo anfitri&oacute;n MySQL: Localhost via UNIX socket



add a note add a note User Contributed Notes
mysql_get_host_info
There are no user contributed notes for this page.

mysql_get_proto_info> <mysql_get_client_info
Last updated: Fri, 22 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites