Thinkphp6安装
thinkphp6必须安装composer
才能安装,命令:
composer create-project topthink/think demo
Thinkphp开启多应用
- 刪除
app
目录下所有其他文件 - 安装多应用模式扩展
composer require topthink/think-multi-app
- 创建前台、后台及公共应用
php think build index
php think build admin
php think build common
需要注意的是,注意:如果没有安装think-multi-app
, 使用php think build
xx会报错:Command "build" is not defined
.