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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:33:43
Original
1080 people have browsed it

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>
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
Latest Issues
Why thinkphp has better performance than laravel?
From 1970-01-01 08:00:00
0
0
0
ThinkPHP Why use composer?
From 1970-01-01 08:00:00
0
0
0
thinkphp versions supported by php6
From 1970-01-01 08:00:00
0
0
0
thinkphp upload files
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template