php连接access数据库
<?php header("Content-type:text/html;charset=utf-8"); $db = new PDO("odbc:driver={microsoft access driver (*.mdb)};dbq=".realpath("a.mdb")) or die("Connect Error"); $rs = $db->query('select * from Conews where SmallClassID=5 order by articleID'); print "<pre>"; print_r($rs->fetchAll()); print "</pre>"; ?>
PHP版本设置为5.2