1.php pdo 链接access数据库:
<?php
try {
$conn = new PDO("odbc:driver={microsoft access driver (*.mdb)};
dbq=".realpath("MyDatabase.mdb"))
or die("链接错误!");
}
catch(PDOException $e){
echo $e->getMessage();
}
?>
2.读取access数据库mydatabase.mdb中users表中的所以数据
<?php
try {
$conn = new PDO("odbc:driver={microsoft access driver (*.mdb)};
dbq=".realpath("MyDatabase.mdb"))
or die("链接错误!");
//echo "链接成功!";
}
catch(PDOException $e)