在我的PHP代码,运行此代码:使用PDO引发的异常“找不到驱动程序”
private function dbConnection() {
if (!is_resource($this->connessione))
try {
$this->connessione = new PDO($this->db_type.":dbname=".$this->db_name.";host=".$this->db_server, $this->db_username, $this->db_pass);
//echo "PDO connection object created";
$this->setupSQLStatement();
}
catch(PDOException $e)
{
echo $e->getMessage();
die();
}
}
它引发的异常“找不到驱动程序”。什么是驱动程序以及如何使用它?
什么是你的P惠普版?你应该至少有PHP 5.1。 – Simone
我使用w.a.m.p. 5 - > wamp5信息文件显示:PHP version 5.2.1;扩展程序chargées:...,PDO,...。 – pheromix
'$ this-> db_type'的值是什么? – Carlos