PHP uses PDO to connect to the ACCESS database. PHP uses pdoto connect to the AccessData warehouse. For more information, see w3cshoolwww.w3cschool.ccphpphp-pdo.html 2. the access code is as follows :? Php $ dbnewPDO (odbc: driver {microsoftaccessdriver PHP uses PDO to connect to the ACCESS Database
1. see W3CSHOOL
Http://www.w3cschool.cc/php/php-pdo.html
2. connect to access
The code is as follows:
$ Db = new PDO ("odbc: driver = {microsoft access driver (*. mdb )};
Dbq = ". realpath (" data. mdb "))
Or die ("Connect Error ");
$ Rs = $ db-> query ('select * from user ');
Print"
";
Print_r ($ rs-> fetchAll ());
Print"
";
The above is a simple and practical php pdo method for connecting to the ACCESS database. I hope you will like it.
Protocol 1, refer to W3CSHOOL http://www.w3cschool.cc/php/php-pdo.html 2, the connection access code is as follows :? Php $ db = new PDO (odbc: driver = {microsoft access driver...