Thinkphp3.2.3 自动生成模块和控制器类

浏览:8514 发布日期:2015/12/21 分类:技术分享 关键字: 自动生成模块
在应用入口文件index.php中写入:
define('BIND_MODULE','Admin');
define('BUILD_CONTROLLER_LIST','Index,User,Menu');

自动生成admin模块和3个controller类
Admin\Controller\IndexController
Admin\Controller\UserController
Admin\Controller\MenuController

注意:如果先写define('BIND_MODULE','Admin'),生成了Admin模块。然后添加define('BUILD_CONTROLLER_LIST','Index,User,Menu'); 这样是生成不了三个类的。 只有define('BIND_MODULE','Admin');
define('BUILD_CONTROLLER_LIST','Index,User,Menu'); 同时运行的时候,才能生成三个controller。
最佳答案
评论( 相关
后面还有条评论,点击查看>>