What is the difference between configuring the database in tp using the default configuration file and using pdo?
What is the difference between configuring the database in tp using the default configuration file and using pdo?
The bottom layer of the framework must still use pdo. The configuration file is given just for your convenience
The framework layer will be reassembled into the PDO dsn connection string
php7 has begun to use pdo to connect to mysql database
Home/Conf/Config.php under the module under thinkphp file
Load the following
//Database configuration
<code>'DB_TYPE' =>'mysql', 'DB_HOST' =>'localhost', 'DB_PORT' =>'3306', 'DB_NAME' =>'数据库名称', 'DB_USER' =>'数据库用户名', 'DB_PWD' =>'数据库密码', 'DB_CHARSET'=>'utf8',</code>