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

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

WBOY
Release: 2016-06-13 10:19:43
Original
1215 people have browsed it

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

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

PHP code
<?phpreturn 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>
Copy after login
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