Use grouping (module grouping)
* is to merge multiple projects into one project/application (that is, home, Admin)
---groups do not group to see their own establishment of the project habits, personal habits with the root directory configuration to generate front and back project mode,
---Because of the group, to control AH configuration ah, such as files to create their own file directory, trouble
Step One: Configuration file generation corresponding project
├─app--Generate app projects/apps due to portal file configuration
├─thinkphp--Core entry file
├─index.php--Portal configuration file
└─index.php Content
<?php
Define (' App_name ', ' APP ');
Define (' App_path ', './app/');
Define (' App_debug ', true);
Require './thinkphp/thinkphp.php ';
?>
Step Two:
Configure the grouping->e:\wamp\www\thinkphp2\app\conf\config.php plus configuration in the App configuration file
<?php
Return Array (
' Config item ' = ' config value '
' App_group_list ' = ' home,admin ',//Project grouping settings
' Default_group ' = ' Home ',//default grouping
);
?>
Step Three:
Note: After configuring http://localhost/thinkphp/you are not accessible in access because the group was started
Http://localhost/thinkphp/index.php/Home/Index/index's going to be so accessible.
However: (Do not make the group access in the control also OK)
├─app
├─app\lib\action
├─home
│ └─indexaction.class.php
├─admin
│ └─indexaction.class.php
* This is only a group access: Http://localhost/thinkphp/index.php/Home/Index/index
--but each group uses its own configuration file.
1: The configured directory after grouping
Conf
├─home Group: conf/home/config.php
├─admin Group: conf/admin/config.php
└─ Public configuration: conf/config.php
2: Do not group configuration directory
conf/config.php
thinkphp use Group details (17)