thinkphp6基础操作

添加view组件,通过composer下载  

composer require topthink/think-view

 

下载完之后如果要开启多后台模式的话

开启多应用模式
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.

 

下载完之后把原来app目录下的controller和view等删除掉最终目录如下所示

 

 

posted @ 2021-08-13 10:54  hcfinal  阅读(250)  评论(0编辑  收藏  举报