開啟多應用模式
1.首先刪除app目錄下所有其他文件
2.安裝多應用模式擴展: composer require topthink/think-multi-app
3.創建三大應用index(前端),admin(后台),common(公共應用)
命令:php think build index
命令:php think build admin
命令:php think build common
注意:如果沒有安裝think-multi-app, 使用php think build xx會報錯:Command "build" is not defined.
默認目錄結構
完整目錄結構
如果目錄不同,需要手動創建文件夾/文件。