Home > PHP Framework > ThinkPHP > body text

How to configure the database in thinkphp5

爱喝马黛茶的安东尼
Release: 2019-08-26 11:28:14
Original
3477 people have browsed it

How to configure the database in thinkphp5

First find the configuration file, in application->config.php.

How to configure the database in thinkphp5

After finding the configuration file, open the configuration file.

How to configure the database in thinkphp5

Related recommendations: "ThinkPHP Tutorial"

Set the namespace and debugging mode.

How to configure the database in thinkphp5

Set the type of database.

How to configure the database in thinkphp5

Set the host address. If you are developing locally, write 127.0.0.1.

How to configure the database in thinkphp5

Set the name of the database, which is which database you want to use.

How to configure the database in thinkphp5

The next step is to set the username and password for the database.

How to configure the database in thinkphp5

How to configure the database in thinkphp5

The above is the detailed content of How to configure the database in thinkphp5. For more information, please follow other related articles on the PHP Chinese website!

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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!