1: composer create-project topthink/think tp5 --prefer-dist
2:发现报错
Composer Downloader TransportException 解决方法
访问了phpcomposer看到是:
secure-http
Defaults to true. If set to true only HTTPS URLs are allowed to be downloaded via Composer. If you really absolutely need HTTP access to something then you can disable it, but using Let's Encrypt to get a free SSL certificate is generally a better alternative.
- 把默认的 secure-http 改成false
composer config -g secure-http false
修改全局文件(推荐)
composer config -g repo.packagist composer https://packagist.phpcomposer.com
再次安装tp5 成功了