Wamp + Pdo Mysql找不到驱动程序 [英] Wamp + Pdo Mysql could not find driver
本文介绍了Wamp + Pdo Mysql找不到驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
最近我在本地计算机上安装了Wamp最新版本.在此之前,我在Windows 7-IIS 7.5中使用了php.我使用了PDO mysql,它工作得很好.
recently i install the Wamp last version in my local computer. Before that i used php in Windows 7 - IIS 7.5. I used PDO mysql and it workd just fine.
try {
$db = new PDO("mysql:host=localhost;dbname=aaa;charset=utf8", "root", "root");
} catch ( PDOException $e ){
print $e->getMessage();
}
但是当我将iss传递给沼泽时,Pdo_mysql无法正常工作.当我访问数据库页面时,出现错误找不到驱动程序".我在Google中搜索,但无法弄清楚.
But when i pass the iss to the wamp, Pdo_mysql not worked. When i visit my db page, it giving error 'could not find driver'. I searched in google but i cant figure this out.
扩展名
extension=php_bz2.dll
extension=php_curl.dll
extension=php_com_dotnet.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
;extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
extension=php_shmop.dll
phpinfo()
phpinfo()
推荐答案
如果在仍然可以在php.ini
中看到该错误的同时收到此错误,则WAMP
对此问题负责.
If you get this error while you can still see it enabled in php.ini
then WAMP
is responsible for this issue.
我建议您改用 XAMPP .
这篇关于Wamp + Pdo Mysql找不到驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文