odbc_pconnect()函数打开一个持久数据库连接
resource odbc_pconnect ( string $dsn , string $user , string $password [, int $cursor_type ] )
它打开一个持久数据库连接
它返回odbc连接ID,失败时将显示0
| 序号 | 参数和说明 |
|---|---|
| 1 | result_id 结果标识符 |
试试下面的实例
<?php
$database = "DSN";
if (!$db = odbc_pconnect($database,"user_id","pass_id")) {
echo "Could not connect to $database!\n";
exit;
}
?>