When using ThinkPHP, the layout directory usually uses a single entry file corresponding to a project directory. However, when writing a configuration file, duplicate configuration items are often used, and public configuration items are put in a public
When using ThinkPHP, the layout directory usually uses a single entry file corresponding to a project directory. However, when writing a configuration file, repeated configuration items are often used, and public configuration items are put in a public directory.
Specific implementation:
1. use the configuration file feature return array (); you can define it in the configuration file of your project as follows:
$ Config = array (''=>'',); then use the return array_merge (include './conf/config. php' function, $ config );
In this way, public configuration files can be used under the root directory.