星星博客 »  > 

如何安装thinkphp

1.在桌面左下方的菜单栏点右键,点击运行,输入cmd,

 

C:\Users\远方的诗和雨>D:()   

D:\>D:\wamp64\www(#将安装位置改到你的www目录下)

运行下面代码

D:\>D:\wamp64\www(我的目录在D盘) curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

等待安装

D:\wamp64\www>curl -sS https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading...

​

 

 

D:\wamp64\www>curl -sS https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading...
输入
D:\wamp64\www>php -v
有如下反应
D:\wamp64\www>php -v
PHP 7.3.21 (cli) (built: Aug  4 2020 11:21:19) ( ZTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.21, Copyright (c) 1998-2018 Zend Technologies
再运行镜像
D:\wamp64\www> composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
在www目录下创建thinkphp文件
D:\wamp64\www> composer create-project topthink/think think(名字可随意修改)
出现如下等待即可
Creating a "topthink/think" project at "./think"
之后
Installing topthink/think (v6.0.7)
  - Downloading topthink/think (v6.0.7)
  - Installing topthink/think (v6.0.7): Extracting archive
Created project in D:\wamp64\www\think
Loading composer repositories with package information
Updating dependencies
Lock file operations: 15 installs, 0 updates, 0 removals
  - Locking league/flysystem (1.1.3)
  - Locking league/flysystem-cached-adapter (1.1.0)
  - Locking league/mime-type-detection (1.7.0)
  - Locking psr/cache (1.0.1)
  - Locking psr/container (1.1.1)
  - Locking psr/log (1.1.4)
  - Locking psr/simple-cache (1.0.1)
  - Locking symfony/polyfill-mbstring (v1.23.0)
  - Locking symfony/polyfill-php72 (v1.23.0)
  - Locking symfony/polyfill-php80 (v1.23.0)
  - Locking symfony/var-dumper (v4.4.22)
  - Locking topthink/framework (v6.0.8)
  - Locking topthink/think-helper (v3.1.4)
  - Locking topthink/think-orm (v2.0.40)
  - Locking topthink/think-trace (v1.4)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 15 installs, 0 updates, 0 removals
  - Downloading psr/cache (1.0.1)
  - Downloading league/mime-type-detection (1.7.0)
  - Downloading league/flysystem (1.1.3)
  - Downloading league/flysystem-cached-adapter (1.1.0)
  - Downloading psr/container (1.1.1)
  - Downloading symfony/polyfill-php80 (v1.23.0)
  - Downloading symfony/polyfill-php72 (v1.23.0)
  - Downloading symfony/polyfill-mbstring (v1.23.0)
  - Downloading symfony/var-dumper (v4.4.22)
  - Downloading topthink/think-helper (v3.1.4)
  - Downloading psr/simple-cache (1.0.1)
  - Downloading psr/log (1.1.4)
  - Downloading topthink/think-orm (v2.0.40)
  - Downloading topthink/framework (v6.0.8)
  - Downloading topthink/think-trace (v1.4)
  - Installing psr/cache (1.0.1): Extracting archive
  - Installing league/mime-type-detection (1.7.0): Extracting archive
  - Installing league/flysystem (1.1.3): Extracting archive
  - Installing league/flysystem-cached-adapter (1.1.0): Extracting archive
  - Installing psr/container (1.1.1): Extracting archive
  - Installing symfony/polyfill-php80 (v1.23.0): Extracting archive
  - Installing symfony/polyfill-php72 (v1.23.0): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.23.0): Extracting archive
  - Installing symfony/var-dumper (v4.4.22): Extracting archive
  - Installing topthink/think-helper (v3.1.4): Extracting archive
  - Installing psr/simple-cache (1.0.1): Extracting archive
  - Installing psr/log (1.1.4): Extracting archive
  - Installing topthink/think-orm (v2.0.40): Extracting archive
  - Installing topthink/framework (v6.0.8): Extracting archive
  - Installing topthink/think-trace (v1.4): Extracting archive
13 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
> @php think service:discover
Succeed!
> @php think vendor:publish
Succeed!
6 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
​

安装完成

 

相关文章