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

查看:180
本文介绍了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天全站免登陆