函式:pg_Connect()


pg_Connect

开启 PostgreSQL 伺服器连线。

语法: int pg_connect(string [host], string [port], string [options], string [tty], string database);

传回值: 整数

函式种类: 资料库功能

内容说明

本函式打开与 PostgreSQL 伺服器的连线。参数 host 表伺服器名称。参数 port 为连线埠。参数 options 为选项。参数 tty 为终端机。参数 database 为资料库名。成功传回连线代号、失败传回 false 值。

使用范例

<?
pg_connect
("dbname=testdb user=wilson password=haha port=5433");
// 以下略
?>

参考

pg_pConnect()  


[ 上一页 下一页 ]