本地环境描述:PHPStudy v8.1
PHP框架:ThinkPHP v5.1
本地域名测试域名:assets.com
composer安装:Composer 中文网 / Packagist 中国全量镜像 (phpcomposer.com)
//修改阿里云镜像 composer config -g repo.packagist composer https://mirrors.aliyun.com/composer //或者中国全量镜像 composer config -g repo.packagist composer https://packagist.phpcomposer.com
//第一次安装 composer create-project topthink/think=5.0.* www.think5.com composer create-project topthink/think=5.1.* www.think51.com //从缓存安装 composer create-project topthink/think=5.0.* www.think5.com --prefer-dist composer create-project topthink/think=5.1.* www.think51.com --prefer-dist 安装ThinkPHP6.0最新版 //安装稳定版 composer create-project topthink/think www.study.com //安装开发版 composer create-project topthink/think=6.0.x-dev tp
--prefer-dist
会从github上下载.zip压缩包,并缓存到本地。下次再安装就会从本地加载,大大加速安装速度。但她没有保留.git文件夹,没有版本信息。适合基于这个包进行开发。
--prefer-source
会从github上克隆源代码,不会在本地缓存。但它保留了.git文件夹,从而可以实现版本控制。适合用于修改源代码。