Aliases
Aliases
Aliases are used to represent file paths or URLs so that you don't have to hard-code absolute paths or URLs in your project. An alias must start with the @
character to be differentiated from normal file paths and URLs. Alias defined without leading @
will be prefixed with @
character.
Yii has many pre-defined aliases already available. For example, the alias @yii
represents the installation path of the Yii framework; @web
represents the base URL for the currently running Web application.
Defining Aliases
You can define an alias for a file p