Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: pg_port - Manual
[go: Go Back, main page]

PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<pg_pingpg_prepare" width="11" height="7"/>
view the version of this page
Last updated: Sun, 07 May 2006

pg_port

(PHP 3, PHP 4, PHP 5)

pg_port --  接続に関連するポート番号を返す

説明

int pg_port ( [resource connection] )

pg_port() は、指定した PostgreSQL connection リソースが接続している ポートの番号を返します。

パラメータ

connection

PostgreSQL データベース接続リソース。connection が指定されていない場合はデフォルトの接続が使用されます。 デフォルトの接続は、直近の pg_connect() あるいは pg_pconnect() によって作成されたものです。

返り値

connection が指しているデータベースのポート番号を 含む int を返します。エラー時には FALSE を返します。

例 1. pg_port() の例

<?php
$pgsql_conn
= pg_connect("dbname=mark host=localhost");

if (
$pgsql_conn) {
   print
"Successfully connected to port: " . pg_port($pgsql_conn) . "<br/>\n";
} else {
   print
pg_last_error($pgsql_conn);
   exit;
}
?>



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

<pg_pingpg_prepare" width="11" height="7"/>
 Last updated: Sun, 07 May 2006
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2006 The PHP Group
All rights reserved.
This mirror generously provided by: PacketBusiness, Inc.
Last updated: Wed Jun 28 13:19:26 2006 JST