Project group: the front-end index file corresponds to one index. php single-entry file, and the backend admin corresponds to another single-entry file. This mode;
The disadvantage of project grouping is that many configuration files and functions cannot be shared. We started to use the project merge method to do all of the work:
Steps:
1. Create a single portal file as before (only one single portal file is required );
2. Create a public configuration file (named config. php ):
Add the following two definitions to the configuration file in the app/conf folder (others are the same ):
'App _ group_list '=> 'index, admin', // enable grouping
'Default _ group' => 'index', // default group
After the preceding method is defined, an error occurs: The template cannot be loaded: index;
Solution: Open the LIB/Action/file, delete the controller, create the project group folder, and add the Controller to it.
Frontend access method: 127.0.0.1/blog/index. php;
Access to the background: 127.0.0.1/blog/index. php/admin;
3. Create a private configuration file for the Project Group:
Create two folders, index and admin, respectively under the APP/conf folder, and create their respective configuration files (named config. php ).
The same applies to common function files. However, if the common function file is named common. php, the project group file must be named function. php.