使用composer 安装 tp5

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.

  1. 把默认的 secure-http 改成false
    composer config -g secure-http false

修改全局文件(推荐)

composer config -g repo.packagist composer https://packagist.phpcomposer.com

再次安装tp5 成功了

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容