How to specify the user frontend directory and management backend directory in YII2.0?

WBOY
Release: 2016-08-04 09:21:44
Original
1089 people have browsed it

For example, like ThinkPHP, it can be set in the configuration file. How is YII2.0 configured?

Reply content:

For example, like ThinkPHP, it can be set in the configuration file. How is YII2.0 configured?

With the advanced version, the front and backends have been separated. I wanted to say something when I saw your title, but when I saw that there was something about TP, I didn’t want to say anything anymore.
In addition, the real name is against the example above. Just changing ns will not work. There are also aliases. If you want to use init to switch the environment, you also need to configure env, etc.

In the mold structure in the yii2 advanced template, backend represents the background application, and frontend represents the front-end application. The front-end and back-end are completely independent, which means that the front-end is removed, and the back-end is still normal. You can also build, for example, a web-based API application. For example: make a backend copy into the API and then pay attention to modifying the namespace.

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 admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template