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

search for in the

maxdb_get_metadata> <maxdb_get_client_version
[edit] Last updated: Sat, 18 May 2013

view this page in

maxdb_get_host_info

maxdb::get_host_info

(PECL maxdb >= 1.0)

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

string $maxdb->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

Voir aussi



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

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