odbc_pconnect()函數(shù)打開一個持久數(shù)據(jù)庫連接
resource odbc_pconnect ( string $dsn , string $user , string $password [, int $cursor_type ] )
它打開一個持久數(shù)據(jù)庫連接
它返回odbc連接ID,失敗時將顯示0
| 序號 | 參數(shù)和說明 |
|---|---|
| 1 | result_id 結(jié)果標識符 |
試試下面的實例
<?php
$database = "DSN";
if (!$db = odbc_pconnect($database,"user_id","pass_id")) {
echo "Could not connect to $database!\n";
exit;
}
?>