0
PDO連接我有PHP版本5.2.8在我的Windows 2003服務器,我試圖與數據庫錯誤在PHP
$dbh = new PDO("mysql:host=localhost;port=3306;dbname=$db_name", $db_user, $db_pass);
連接,但是當我用這個說法我得到了以下錯誤
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'
in bin\db.php:14 Stack trace: #0 bin\db.php(14):
PDO->__construct('mysql:host=loca...', 'root', '123') #1
main.php(4): include_once('C:\Inetpub\wwwr...') #2
{main} thrown in bin\db.php on line 14
我該如何解決這個問題?
謝謝
可能重複的[PDOException「找不到驅動程序」](http://stackoverflow.com/questions/2852748/pdoexception-could-not-find-driver) – 2011-02-09 13:36:19
我檢查了這一點,但這也沒有工作... – air 2011-02-09 14:00:12