ThinkPHP从5.1版开始不再提供压缩包下载,仅支持Composer或Git方式安装。
window环境下的安装
方法一:
打开Windows命令行窗口,转到安装目录,例如:
d: cd d:\php
然后输入以下命令并执行:
composer create-project topthink/think tp
就会在d:\php目录下新建tp目录并从网络复制ThinkPHP的最新源码
方法二:
以上操作也可以合并到一行命令:
composer create-project topthink/think d:\php\tp
即在命令中使用完整的目标路径。
安装成功的提示信息:
Installing topthink/think (v5.1.0) - Installing topthink/think (v5.1.0): Loading from cache Created project in d:\php\tp Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 2 installs, 0 updates, 0 removals - Installing topthink/think-installer (v1.0.12): Loading from cache - Installing topthink/framework (v5.1.4): Loading from cache Writing lock file Generating autoload files