且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在PHP中为sqlite3启用PDO驱动程序?

更新时间:2022-12-01 10:20:52

我认为sqlite3的PDO驱动程序称为"sqlite",因此您已经安装了它. sqlite2驱动程序较旧.

I think that the PDO driver for sqlite3 is called 'sqlite', so you already have it installed. The sqlite2 driver is older.

PDO_SQLITE是一个驱动程序, 实现PHP数据对象(PDO) 界面以启用对SQLite 3的访问 数据库.

PDO_SQLITE is a driver that implements the PHP Data Objects (PDO) interface to enable access to SQLite 3 databases.

在PHP 5.1中,SQLite扩展也 提供SQLite 2的驱动程序 数据库;虽然不是技术上的 PDO_SQLITE驱动程序的一部分,它 表现类似,因此已记录在案 在它旁边. SQLite 2驱动程序 提供PDO主要是为了使其 易于导入旧版SQLite 2 数据库文件到应用程序中 使用更快,更有效的 SQLite 3驱动程序.结果, SQLite 2驱动程序功能不丰富 作为SQLite 3驱动程序.

In PHP 5.1, the SQLite extension also provides a driver for SQLite 2 databases; while it is not technically a part of the PDO_SQLITE driver, it behaves similarly, so it is documented alongside it. The SQLite 2 driver for PDO is provided primarily to make it easier to import legacy SQLite 2 database files into an application that uses the faster, more efficient SQLite 3 driver. As a result, the SQLite 2 driver is not as feature-rich as the SQLite 3 driver.

来自 http://php.net/manual/en/ref.pdo -sqlite.php