php版本要求 > php7.1
1、composer 镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
2、composer 安装thinkphp6
composer create-project topthink/think mytp6web
命令行使用:
快速生成应用
php think build admin php think build api
注意:使用build命令时,必须先安装多应用模式扩展
compoesr require topthink/think-multi-app
快速生成控制器
php think make:controller admin@Banner
注意:如果不需要自动生成默认方法,添加 --plain
php think make:controller admin@Banner --plain
快速生成模型
php think make:model admin@Banner
快速生成中间件
php think make:middleware Auth
创建验证器类
php think make:validate admin@User
phpstudy 下 nginx伪静态
if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; }