Packagist / Composer中国全量镜像
https://pkg.phpcomposer.com/

composer 国内镜像 配置命令:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
(命令执行后无输出,表示配置正确)

全局安装composer:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
打开cmd输入composer -v,显示如下即安装成功 切换到任意目录再次测试一下composer -v,显示如下安装成功(https://www.cnblogs.com/chenhaoyu/p/6379205.html)

安装thinkphp:(如果安装不了,可能是网络问题,尝试上面配置国内镜像)http://www.thinkphp.cn/topic/39142.html
composer create-project topthink/think
composer create-project topthink/think composerTP –prefer-dist

1. 先确保你所运行的php环境已经成功安装好了composer。并且已将php.exe所在目录路径加入到了系统的环境变量中。
2. 然后win+R,输入cmd,启动命令窗口,切换路径到web根目录下。
3. composer create-project topthink/thinkwhatever_you_like_name –prefer-dist

发表评论