Home > php教程 > php手册 > ADODB 数据库Access连接,adodb数据库access

ADODB 数据库Access连接,adodb数据库access

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 08:55:52
Original
1237 people have browsed it

ADODB 数据库Access连接,adodb数据库access

$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."db\db.mdb"; //数据库路径
include "../adodb/adodb.inc.php"; //载入adodb
$conn = ADONewConnection('access'); //建立accessl连接
$conn->Pconnect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$newpath");
$conn->execute("set names utf8");

?>

Related labels:
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template