git 安装
1. git clone --depth=1 https://github.com/top-think/think.git project_name
2.cd project_name
3.git clone --depth=1 https://github.com/top-think/framework.git thinkphp
composer安装
1.切换国内镜像 composer config -g repositories.packagist composer https://packagist.phpcomposer.com
2.composer create-project --prefer-dist topthink/think TP5
*注:有些开源TP项目下载至本地无法运行有可能是应为本地服务器没有开启pathinfo模式,Apache rewrite模块.