我已经将MS Access 2007数据库连接到PHP,但是找不到其文件.accdb扩展名。在.mdb.accdb扩展文件中,成功连接。为什么在.accdb扩展名中找不到文件?
<?php
$filename = 'C:\Website\Account\ABC\DataBase\AccountAaravStock.accdb';
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
$conn = odbc_connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=$filename","","");
if($conn){
echo "Connected";
}else{
echo "Failed";
}
?>