Project grouping and project merging-entry required

Source: Internet
Author: User

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.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.