在命令行下面,切换到你的WEB根目录下面并执行下面的命令:
composer create-project topthink/think projectname
如果要使用多应用模式,需要cd 到项目根目录安装多应用模式扩展
think-multi-app
。
composer require topthink/think-multi-app
composer require topthink/think-view
php think build admin //创建后台管理
php think build api //创建前端访问api
php think build home //创建站点前台
Run
php think run //http://localhost:8000/
//or
php think run -p 80 //http://localhost
根目录下route文件夹复制到 admin目录里面进行后台路由配置