mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-27 18:32:09 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@218975 c90b9560-bf6c-de11-be94-00142212c4b1
105 lines
2.5 KiB
XML
105 lines
2.5 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.9 $ -->
|
|
<!-- EN-Revision: 1.6 Maintainer: jsgoupil Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry id="function.pg-host">
|
|
<refnamediv>
|
|
<refname>pg_host</refname>
|
|
<refpurpose>
|
|
Retourne le nom d'hôte
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>pg_host</methodname>
|
|
<methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pg_host</function> retourne le nom d'hôte associé
|
|
à l'index de connexion PostgreSQL.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>connection</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La ressource de connexion de la base de données PostgreSQL. Lorsque
|
|
<parameter>connection</parameter> n'est pas présent, la connexion par
|
|
défaut est utilisée. La connexion par défaut est la dernière connexion
|
|
faite par <function>pg_connect</function> ou <function>pg_pconnect</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Une chaîne contenant le nom de l'ordinateur hôte de
|
|
<parameter>connection</parameter> ou &false; en cas d'erreur.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>pg_host</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$pgsql_conn = pg_connect("dbname=mark host=localhost");
|
|
|
|
if ($pgsql_conn) {
|
|
print "Correctement connecté à : " . pg_host($pgsql_conn) . "<br/>\n";
|
|
} else {
|
|
print pg_last_error($pgsql_conn);
|
|
exit;
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>pg_connect</function></member>
|
|
<member><function>pg_pconnect</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|