Home  >  Article  >  Backend Development  >  thinkphp连接access数据库有关问题求解

thinkphp连接access数据库有关问题求解

WBOY
WBOYOriginal
2016-06-13 13:33:43968browse

thinkphp连接access数据库问题求解
我现在相用thinkphp+access来做网站,但是不知道怎么用thinkphp连接数据库,知道的说一下吧。求解~~~~~~谢了

------解决方案--------------------
config.php配置如下,db.mdb为数据文件地址

PHP code
<?php return array(
    'APP_DEBUG' =>true, 
    'DB_TYPE'=> 'pdo',
    'DB_DSN'=>"odbc:driver={microsoft access driver (*.mdb)};dbq="db.mdb",
    'DB_USER'=>'root',
    'DB_PWD'=>'',
    'DB_PREFIX'=>'',
);
?> <div class="clear">
                 
              
              
        
            </div>
Statement:
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