Home > Backend Development > PHP Tutorial > ADODB database Access connection

ADODB database Access connection

WBOY
Release: 2016-07-30 13:31:18
Original
1409 people have browsed it

$filepath=__FILE__;
//echo __FILE__;
$newarray=explode("\",$filepath);
$num=count($newarray)-1;
$filenamelen=strlen($ newarray[$num]);
$totallen=strlen(__FILE__);
$subnum=$totallen-$filenamelen-5;
$tmppath=substr(__FILE__,0,$subnum);
$newpath=$tmppath." dbdb.mdb"; //Database path
include "../adodb/adodb.inc.php"; //Load adodb
$conn = ADONewConnection('access'); //Establish accessl connection
$conn-> ;Pconnect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$newpath");
$conn->execute("set names utf8");
?>

The above introduces the ADODB database Access connection, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template