Home > php教程 > php手册 > PHP could not find driver 的解决教程

PHP could not find driver 的解决教程

WBOY
Release: 2016-06-13 11:36:49
Original
1927 people have browsed it

  在调试一个PHP程序时,报了这个错误, could not find driver 在网上搜一下,有解决方法如下,原来我的这个程序中用到了PDO对象,连接mysql 5. 在PHP的默认设置中,只打开了PHP_pdo 模块, 没有打开PHP_pdo_mysql模块.所以才会出现找不到驱动程序的错误. 把这个模块打开,重启apache就可以了. 当然了,如果你用别的数据库,打开对应的模块就OK了。

  但是,我这样操作后依然提示 could not find driver 最后终于发现原来是因为机上没有安装sql2000没有ntwdblib.dll这个文件,网上找了一个,复制到相关目录下。

  a) php\

  b) Apache\bin\ 问题解决

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template