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

search for in the

maxdb_get_metadata> <maxdb_get_client_version
Last updated: Fri, 14 Nov 2008

view this page in

maxdb_get_host_info

maxdb->get_host_info

(PECL maxdb:1.0-7.6.00.38)

maxdb_get_host_info -- maxdb->get_host_infoRetourne une chaîne représentant le type de de connexion utilisé

Description

Style procédural :

string maxdb_get_host_info ( resource $link )

Style orienté objet (propriété) :

maxdb
string $host_info;

maxdb_get_host_info() retourne une chaîne décrivant la connexion représentée par le paramètre link .

Valeurs de retour

Une chaîne représentant l'hôte du serveur ainsi que le type de connexion.

Exemples

Exemple #1 Style orienté objet

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

/* Vérification de la connexion */
if (maxdb_connect_errno()) {
    
printf("Echec de la connexion : %s\n"maxdb_connect_error());
    exit();
}

/* Affiche les informations de l'hôte */
printf("Informations sur l'hôte : %s\n"$maxdb->host_info);

/* Fermeture de la connexion */
$maxdb->close();
?>

Exemple #2 Style procédural

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

/* Vérification de la connexion */
if (maxdb_connect_errno()) {
    
printf("Echec de la connexion : %s\n"maxdb_connect_error());
    exit();
}

/* Affiche les informations de l'hôte */
printf("Informations sur l'hôte : %s\n"maxdb_get_host_info($link));

/* Fermeture de la connexion */
maxdb_close($link);
?>

L'exemple ci-dessus va afficher quelque chose de similaire à :

Informations sur l'hôte : localhost


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

maxdb_get_metadata> <maxdb_get_client_version
Last updated: Fri, 14 Nov 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites