日期:2014-05-16 浏览次数:20546 次
function conn(){
try {
$this->conn = new com("ADODB.Connection");
$this->conn->Open("DRIVER={Microsoft Access Driver (*.mdb,*.accdb)}; DBQ=" . realpath("include/Database.mdb"));
//$this->conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath($this->dbPath).";Uid=;Pwd=".$this->dbPWD.";");
$this->showMessage = $this->siteCode;
}
catch(Exception $e){
$this->showMessage = mb_convert_encoding($e->getMessage(), "UTF-8", "GBK"). '<br />' . $this->siteCode;
}
}
echo realpath("include/Database.mdb");
D:\PHP_Site\HouyuanMDB\include\Database.mdb