composer create-project topthink/think www
composer require topthink/think-multi-app
删除app目录下的controller文件夹
生成新的应用模块
开启多应用配置(config/app.php)
应用映射(config/app.php)
域名绑定(config/app.php)
生成新应用模块php think build demo开启多应用配置'auto_multi_app' => true,应用映射'app_map' => [ 'think' => 'admin', // 把admin应用映射为think],域名绑定'domain_bind' => [ 'blog' => 'blog', // blog子域名绑定到blog应用 'shop.tp.com' => 'shop', // 完整域名绑定 '*' => 'home', // 二级泛域名绑定到home应用],