日期:2014-05-16  浏览次数:20405 次

thinkPHP--模块分组

启用分组模块非常简单,配置下APP_GROUP_LIST参数和DEFAULT_GROUP参数即可。

'APP_GROUP_LIST'=>'Admin,Home',

'DEFAULT_GROUP'=>'Home',将Home设为默认的项目。


在我们启用项目分组之前,由于使用的两个项目,所以URL地址分别是:

http://serverName/index.php/Index/index     Home项目地址

http://serverName/Admin/index.php/Index/index    Admin项目地址

采用了分组模式后,URL地址变成:

http://serverName/index.php/Home/Index/index   Home分组地址

http://serverName/index.php/Admin/Index/index   Admin分组地址

如果Home是默认分组的话 还可以变成 http://serverName/index.php/Index/index


具体使用说明:http://doc.thinkphp.cn/manual/module_group.html