diff --git a/Think/Create.php b/Think/Create.php index 0065fe80..0ba33a4f 100644 --- a/Think/Create.php +++ b/Think/Create.php @@ -12,43 +12,50 @@ namespace Think; class Create { - static public function build($install) { + static public function build($build) { // 锁定 - $lockfile = APP_PATH.'install.lock'; + $lockfile = APP_PATH.'create.lock'; if(is_writable($lockfile)) { return ; } else { touch($lockfile); } - foreach ($install as $module=>$list){ + foreach ($build as $module=>$list){ if(!is_dir(APP_PATH.$module)) {// 创建模块目录 mkdir(APP_PATH.$module); } + // 创建配置文件和公共文件 + self::buildCommonFile($module); + // 创建欢迎页面 + self::buildHelloController($module); + + // 创建子目录和文件 foreach($list as $path=>$file){ if(is_int($path)) { // 生成文件 if(!is_file(APP_PATH.$module.'/'.$file)) { - file_put_contents(APP_PATH.$module.'/'.$file,""); + file_put_contents(APP_PATH.$module.'/'.$file,"