我收到“找不到驱动程序”错误....有什么想法吗?我已经盯着这个看了很长时间,所以我需要用新的眼光来看待它。谢谢!
<?php
try {
$objDb = new PDO('myql:host=localhost;dbname=test',
'$user', '$pass');
$objDb->exec('SET CHARACTER SET utf8');
$sql = "SELECT *
FROM 'departments'
WHERE 'code' = 0";
$statement = $objDb->query($sql);
$list = $statement->fetchAll(PDO::FETCH_ASSOC);
} catch(PDOException $e) {
echo $e->getMessage();
}
?>
我不知所措....我家里有所有这些设置,所以我对一切都有根。这是我所知道的:
**phpinfo()**
**PDO**
PDO support enabled
PDO drivers mysql
**pdo_mysql**
PDO Driver for MySQL enabled
Client API version mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $
**mysql**
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $