Home > Article > PHP Framework > Types of ThinkPHP configuration files
In the last issue, we talked about the automatic loading of ThinkPHP classes. If you don’t know much about it, you can follow the link below to check it out. This article will take you through the interpretation of the ThinkPHP configuration file.
I have been thinking about it for a long time and finally started writing a series of articles. I hope to write A series of articles that can handle promotions and interviews.
When you read this article, if you find hot interview questions or technical difficulties that Kaka has not written, please point them out in the comment area and improve them together.
There are four types of configuration files in ThinkPHP. How much do you know! It doesn’t matter if you don’t know. KaKa will show you once.
These four configuration files are conventional configuration, application configuration, module configuration, and dynamic configuration.
It needs to be explained here that conventional configuration and dynamic configuration will not be used in general development, especially dynamic configuration.
Dynamic configuration is set directly using Config::set("Set dynamic configuration file"), so don't use this thing, you must not use it, otherwise how will you manage it later in the project.
About these four types of configuration files, Kaka will show you directly with a picture, without going into too much explanation. The focus of this article is not to introduce this stuff to you.
About ThinkPHP5.1, the separate config file has been cancelled, and the application configuration has been modified to the app.php file under config.
New module configuration is added. The module configuration is also in the config directory. For example, if you have two modules in the app directory, namely index and admin, you can create them directly in the config directory. admin and index directories, and then create the configuration file of the corresponding module.
The priority of these four configuration files is the order in the above picture, management configuration, application configuration, module configuration, dynamic configuration
Keep learning, keep blogging, keep sharing This is the belief that Kaka has always adhered to since its inception. I hope that Kaka’s articles on the huge Internet can bring you a little bit of help. I’m Kaka, see you next time.
The above is the detailed content of Types of ThinkPHP configuration files. For more information, please follow other related articles on the PHP Chinese website!