pdo sqlite 找不到驱动程序... php 文件未处理 [英] pdo sqlite could not find driver... php file not processing

查看:38
本文介绍了pdo sqlite 找不到驱动程序... php 文件未处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试通过 php 文件连接到 sqlite 时收到 找不到驱动程序 错误.我已将权限设置为 777... PHP 版本 5.2.16,我已安装模块.找不到驱动程序的任何原因,php.ini 也显示已安装扩展名 pdo.so 和 pdo_mysql.so.

Hi i'm received the could not find driver error when trying to connect to sqlite via a php file. I've set permission to 777... PHP Version 5.2.16, i have the module install. any reason why its not finding the driver, also php.ini is showing the extension pdo.so and pdo_mysql.so installed.

PDO

已启用 PDO 支持PDO驱动mysql

PDO support enabled PDO drivers mysql

pdo_mysql

用于 MySQL 的 PDO 驱动程序,客户端库版本 5.0.92

PDO Driver for MySQL, client library version 5.0.92

try {
    // Connect to the SQLite Database.
    $db = new PDO('sqlite:.subscribers.db');
} catch(Exception $e) {
    die('connection_unsuccessful: ' . $e->getMessage());
}

推荐答案

您需要

[PDO_SQLITE]
extension=pdo_sqlite.so

启用,用于sqlite:.subscribers.db

或者,对于 Windows:

or, for windows:

[PHP_PDO_SQLITE]
extension=php_pdo_sqlite.dll

当然这个扩展在你的 ext 目录中

And ofcourse this extension in your ext directory

这篇关于pdo sqlite 找不到驱动程序... php 文件未处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆