mirror of
https://github.com/php/doc-ru.git
synced 2025-07-30 12:57:40 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/ru/trunk@314908 c90b9560-bf6c-de11-be94-00142212c4b1
95 lines
2.8 KiB
XML
95 lines
2.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: mch Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
<!-- $Revision$ -->
|
||
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.20 -->
|
||
<refentry xml:id="function.pg-port" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>pg_port</refname>
|
||
<refpurpose>
|
||
Возвращает номер порта, соответствующий заданному соединению
|
||
</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<type>int</type><methodname>pg_port</methodname>
|
||
<methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
<function>pg_port</function> возвращает номер порта, соответствующего
|
||
заданному соединению PostgreSQL <parameter>connection</parameter>.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<para>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><parameter>connection</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Ресурс подключения к базе данных PostgreSQL. Если параметр
|
||
<parameter>connection</parameter> не задан, будет использовано
|
||
подключение по умолчанию - последнее соединение, открытое функцией
|
||
<function>pg_connect</function> или <function>pg_pconnect</function>.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
Число типа <type>int</type> соответствующее номеру порта, либо &false; в случае ошибки.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<para>
|
||
<example>
|
||
<title>Пример использования <function>pg_port</function></title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
$pgsql_conn = pg_connect("dbname=mark host=localhost");
|
||
|
||
if ($pgsql_conn) {
|
||
print "Успешно соединено с портом : " . pg_port($pgsql_conn) . "<br/>\n";
|
||
} else {
|
||
print pg_last_error($pgsql_conn);
|
||
exit;
|
||
}
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
</example>
|
||
</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:"~/.phpdoc/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
|
||
--> |