首页 >后端开发 >php教程 >ADODB 数据库Access连接,adodb数据库access_PHP教程

ADODB 数据库Access连接,adodb数据库access_PHP教程

WBOY
WBOY原创
2016-07-13 09:44:331032浏览

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");

?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1048756.htmlTechArticleADODB 数据库Access连接,adodb数据库access ?php $filepath=__FILE__; //echo __FILE__; $newarray=explode("\\",$filepath); $num=count($newarray)-1; $filenamelen=strlen($newarr...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn