Home > Article > PHP Framework > Where is the yii configuration file?
Each Yii environment is a set of configuration files, including the entry script index.php and various configuration files. In fact, they are all placed under the /path/to/digpage.com/environments directory. Let’s take a look at what is in this directory:
. ├── dev │ ├── backend │ │ ├── config │ │ │ ├── main-local.php │ │ │ └── params-local.php │ │ └── web │ │ ├── index-test.php │ │ └── index.php │ ├── common │ │ └── config │ │ ├── main-local.php │ │ └── params-local.php │ ├── console │ │ └── config │ │ ├── main-local.php │ │ └── params-local.php │ ├── frontend │ │ ├── config │ │ │ ├── main-local.php │ │ │ └── params-local.php │ │ └── web │ │ ├── index-test.php │ │ └── index.php │ └── yii ├── prod │ ├── backend │ │ ├── config │ │ │ ├── main-local.php │ │ │ └── params-local.php │ │ └── web │ │ └── index.php │ ├── common │ │ └── config │ │ ├── main-local.php │ │ └── params-local.php │ ├── console │ │ └── config │ │ ├── main-local.php │ │ └── params-local.php │ ├── frontend │ │ ├── config │ │ │ ├── main-local.php │ │ │ └── params-local.php │ │ └── web │ │ └── index.php │ └── yii └── index.php
From the directory structure diagram above, you can see that under the environment directory There are 3 things:
Directory dev
Directory prod
File index.php
Among them, dev and prod have the same structure, and contain 4 directories and 1 file:
frontend directory, used for front-end applications, including the config directory to store configuration files and the web directory to store web entry scripts
backend directory, used for background applications, the content is the same as frontend
console directory, used for command line applications, only contains the config directory, because command line applications do not require web entry scripts. Therefore there is no web directory.
common directory is used for common environment configuration of various web applications and command line applications. It only contains the config directory because different applications cannot share the same entry script. Note that the level of this common is lower than the level of the environment. In other words, its universality is only common in a certain environment, not in all environments.
yii file is the entry script file for command line applications.
Recommended learning: yii framework
The above is the detailed content of Where is the yii configuration file?. For more information, please follow other related articles on the PHP Chinese website!