编辑跟目录下的buid.php文件
<?php return [ // 生成应用公共文件 '__file__' => ['common.php'], // 定义demo模块的自动生成 (按照实际定义的文件名生成) 'demo' => [ '__file__' => ['common.php'], '__dir__' => ['behavior', 'controller', 'model', 'view'], 'controller' => ['Index', 'Test', 'UserType'], 'model' => ['User', 'UserType'], 'view' => ['index/index'], ], 'socketio' => [ '__file__' => ['common.php'], '__dir__' => ['controller', 'model', 'view'], 'controller' => ['Index', 'Server'], 'model' => [], 'view' => ['index/index'], ], // 其他更多的模块定义 ];
然后将其放到application文件目录下
然后在根目录下运行控制台命令
php think build // 生成成功输出 Successed
然后你就会发现在application下面就创建好了您所需要的目录结构及文件