title
thinkPHP connect to the database, the following error occurs:
could not the Find Driver
Not find the driver caused not open the corresponding expansion. According to error messages, error location to PDO.
Error detection and location
使用phpinfo();函数,检查PDO状态。按Ctrl+f,输入pdo。
发现enabled为空:
出现以上情况,本文描述两种可能。
1.extension_dir 路径错误
2.pdo未开启
Php.ini configuration file
打开配置文件,Ctrl+f,搜索pdo,将代码前面的分号去掉。
extension_dir = "ext" //如果还是报could not find driver,请填写ext在PHP安装目录的绝对路径
extension=pdo_firebird
extension=pdo_mysql
extension=pdo_oci
extension=pdo_odbc
extension=pdo_pgsql
extension=pdo_sqlite
extension=pgsql
In addition, point a praise it, your best you handsome.