thinkphp 5.1安装
1,安装Composer
2,启用中文镜像:
修改 composer 的全局配置文件(推荐方式)
打开命令行窗口(windows用户)或控制台(Linux、Mac 用户)并执行如下命令:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
3,安装thinkphp 5.14
命令行:
C:\Users\Administrator>cd C:\phpStudy\PHPTutorial\WWW
C:\phpStudy\PHPTutorial\WWW>composer create-project topthink/think tp51
Installing topthink/think (v5.1.14)
- Installing topthink/think (v5.1.14): Downloading (100%)
Created project in tp51
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Installing topthink/think-installer (v2.0.0): Downloading (100%)
- Installing topthink/framework (v5.1.14): Downloading (100%)
Writing lock file
Generating autoload files
C:\phpStudy\PHPTutorial\WWW>
4,安装thinkphp扩展库(验证码)
C:\phpStudy\PHPTutorial\WWW>cd tp51
C:\phpStudy\PHPTutorial\WWW\tp51>composer require topthink/think-captcha
Using version ^2.0 for topthink/think-captcha
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing topthink/think-captcha (v2.0.2): Downloading (100%)
Writing lock file
Generating autoload files
C:\phpStudy\PHPTutorial\WWW\tp51>
5,安装thinkphp扩展库(图像处理)
C:\phpStudy\PHPTutorial\WWW\tp51>composer require topthink/think-image
Using version ^1.0 for topthink/think-image
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing topthink/think-image (v1.0.7): Downloading (100%)
Writing lock file
Generating autoload files
C:\phpStudy\PHPTutorial\WWW\tp51>