打开php中的pgsql扩展
extension=pgsql
使用adodb5连接kingbase数据库
<?php
include("adodb5/adodb.inc.php");
$fox_dbtype = 'pgsql';
$fox_host = '192.168.1.66';
$fox_user = 'system';
$fox_pwd = '123456';
$fox_dbname = 'testkingbase';
$fox_port = 54321;
$db=NewADOConnection($fox_dbtype);
$db->port = $fox_port;
$db->Connect($fox_host,$fox_user,$fox_pwd,$fox_dbname) or die ("connection1 failed");
echo 'connection successify';
?>