Today the company needs to connect to the Access database with PHP, the results of a half-day Access database is not connected to find a lot of information, the following is my experience,
-.-want to help people who need to connect to access data. -.-
Note: When you install an Access database, you need to install an Office version that matches the native system , Win7 64-bit systems, and office is 64-bit office2010 best-fit ...
because I experienced the pain from 2003-2007-2010, especially when I was loading 2010, because the 2003 version of Office was loaded , which required completely clean up the 2003 version of Office.
All advised that you can pack 2010 as much as possible 2010 of the bar, but if you do not pretend, but also you O (* ̄▽ ̄*) O.
The first step
Reprinted Office 2010, which I pass directly. Dear students, we can search Baidu. Note with the native operating system is how many bits of how many bits of the Oh!!
Step Two
After you have installed Office, first open your--control panel--management tools--(data source) odbc--System DNS--Add--access database
Note that you can also set up your account and password in ODBC. Click Advanced to set it up.
Step Three
The code for the PHP connection to access data is as follows:
What I want to say is that the PHP connection data has several ways of PDO driver, ADO, and the ODBC connection I'm talking about today,
Reprint please specify the original address---------------------------------Thank you!!!
Talking about the connection of php+access database attention points