问题描述
我的SQLite是3.4.0版:图像
My SQLite is version 3.4.0:image
但是未启用/列出我的phpinfo对SQLitev3的PDO支持:图像
However my phpinfo's PDO support for SQLitev3 is not enabled/listed:image
如何启用它?我通过XAMPP安装了Web服务器.
How can I enable it? I installed my web server via XAMPP.
推荐答案
我认为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.
在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
这篇关于如何在PHP中为sqlite3启用PDO驱动程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!