Think/Build.php
public static function buildController($module, $controller = 'Index')
    {
        $file = APP_PATH.$module.'/Controller/'.$controller.'Controller.php';
        if (!is_file($file)) {
            $content = str_replace(['[MODULE]', '[CONTROLLER]'], [$module, $controller], static::$controller);
            $dir = dirname($file);
            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }
            file_put_contents($file, $content);
        }
    }
public static function buildController($module, $controller = 'Index')
    {
        $file = APP_PATH.$module.'/Controller/'.$controller.'Controller.php';
        if (!is_file($file)) {
            $content = str_replace(['[MODULE]', '[CONTROLLER]'], [$module, $controller], static::$controller);
            $dir = dirname($file);
            if (!is_dir($dir)) {
                mkdir($dir, 0755, true);
            }
            file_put_contents($file, $content);
        }
    }
创建控制器类

@param        $module
@param string $controller