函数名称:fbird_connect()
适用版本:PHP 4 >= 4.2.0, PHP 5, PHP 7
用法:fbird_connect() 函数用于建立到 Firebird 数据库服务器的连接。
语法:resource fbird_connect ( string $database [, string $username [, string $password [, string $charset [, int $buffers [, int $dialect [, string $role [, int $sync [, int $async [, int $timestamp [, int $lazy ]]]]]]]]]] )
参数:
返回值:成功时返回一个 Firebird 连接标识符,失败时返回 FALSE。
示例:
<?php
// 建立到 Firebird 数据库的连接
$database = "localhost:C:\path\to\database.fdb";
$username = "myusername";
$password = "mypassword";
$charset = "UTF8";
$buffers = 100;
$dialect = 1;
$role = "myrole";
$sync = 1;
$async = 0;
$timestamp = 1;
$lazy = 0;
$conn = fbird_connect($database, $username, $password, $charset, $buffers, $dialect, $role, $sync, $async, $timestamp, $lazy);
if ($conn) {
echo "成功建立到 Firebird 数据库的连接";
} else {
echo "无法连接到 Firebird 数据库";
}
?>