选择语言 :

 Driver_Database_Driver_SQLite::connect

连接数据库

$use_connection_type 默认不传为自动判断,可传true/false,若传字符串(只支持a-z0-9的字符串),则可以切换到另外一个连接,比如传other,则可以连接到$this->_connection_other_id所对应的ID的连接

null Driver_Database_Driver_SQLite::connect( [ boolean $use_connection_type = null ] )

参数列表

参数 类型 描述 默认值
$use_connection_type boolean 是否使用主数据库 null
File: ./drivers/database/sqlite/sqlite.class.php
public function connect($use_connection_type = null)
{
    $connection_id = $this->connection_id();

    if (!$connection_id || !isset(Database_Driver_SQLite::$_connection_instance[$connection_id]))
    {
        $this->_connect();
    }

    # 设置编码
    $this->set_charset($this->config['charset']);
}