Home > Backend Development > PHP Tutorial > PHP连接PGSQL

PHP连接PGSQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 14:34:49
Original
1946 people have browsed it

function conn($hostName,$Login,$Password,$dbName,$Port) //建立目标数据库连接{    $conn = &ADONewConnection('postgres8');    $conn->debug = false; //true时adodb将在页面显示debug信息    $conn->LogSQL(false); //true时adodb将建立adodb_sqllog表记录每次sql操作    $conn->Connect($hostName,$Login,$Password,$dbName,$Port);     //$conn->Connect("localhost","olebarowner","olebar",'hn_db');           $conn->SetFetchMode(ADODB_FETCH_ASSOC);    return $conn;}
Copy after login

PHP连接PGSql的方法

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template