mirror of
https://github.com/php/doc-fr.git
synced 2026-03-30 02:52:10 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@158710 c90b9560-bf6c-de11-be94-00142212c4b1
67 lines
1.7 KiB
XML
67 lines
1.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
|
<refentry id="function.pg-ping">
|
|
<refnamediv>
|
|
<refname>pg_ping</refname>
|
|
<refpurpose>Pingue la connexion à la base</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>pg_ping</methodname>
|
|
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pg_ping</function> pingue la connexion à la base de données,
|
|
et essaie de se reconnecter si la connexion est perdue. <function>pg_ping</function>
|
|
retourne &true; si la connexion est active, et &false; sinon.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>pg_ping</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$conn = pg_pconnect ("dbname=publisher");
|
|
if (!$conn) {
|
|
echo "Une erreur est survenue.\n";
|
|
exit;
|
|
}
|
|
|
|
if (!pg_ping($conn))
|
|
die("La connexion est morte\n");
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
Voir aussi
|
|
<function>pg_connection_status</function> et
|
|
<function>pg_connection_reset</function>.
|
|
</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
|
|
-->
|