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

search for in the

maxdb_get_metadata> <maxdb_get_client_version
[edit] Last updated: Fri, 25 May 2012

view this page in

maxdb_get_host_info

maxdb::get_host_info

(PECL maxdb >= 1.0)

maxdb_get_host_info -- maxdb::get_host_infoReturns a string representing the type of connection used

Beschreibung

Prozeduraler Stil

string maxdb_get_host_info ( resource $link )

Objektorientierter Stil

string $maxdb->host_info;

The maxdb_get_host_info() function returns a string describing the connection represented by the link parameter is using.

Rückgabewerte

A character string representing the server hostname and the connection type.

Beispiele

Beispiel #1 Objektorientierter Stil

<?php
$maxdb 
= new maxdb("localhost""MONA""RED""DEMODB");

/* check connection */
if (maxdb_connect_errno()) {
   
printf("Connect failed: %s\n"maxdb_connect_error());
   exit();
}

/* print host information */
printf("Host info: %s\n"$maxdb->host_info);

/* close connection */
$maxdb->close();
?>

Beispiel #2 Prozeduraler Stil

<?php
$link 
maxdb_connect("localhost""MONA""RED""DEMODB");

/* check connection */
if (maxdb_connect_errno()) {
   
printf("Connect failed: %s\n"maxdb_connect_error());
   exit();
}

/* print host information */
printf("Host info: %s\n"maxdb_get_host_info($link));

/* close connection */
maxdb_close($link);
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

Host info: localhost

Siehe auch



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

 
show source | credits | stats | sitemap | contact | advertising | mirror sites