安装Windows环境下Composer的安装教程
作者:互联网
安装Windows环境下Composer的安装教程
- 先下载Composer-Setup.exe,下载地址:下载Composer 。会自动搜索PHP.exe的安装路径,如果没有,就手动找到php路径下的php.exe。
2找到php.exe
。
查看版本
查看是否安装
Cmd----composer -v
使用:
安装tp框架
命令
composer create-project topthink/think tp5 --prefer-dist
结果:
开始 ThinkPHP 项目:
composer create-project topthink/thinkphp:3.2.3 blog-tp3 --prefer-dist ## 如果加上prefer参数,可以指定优先下载什么样的个数
composer create-project topthink/think blog-tp5 --prefer-dist
其他框架
开始一个 Laravel 项目:
composer create-project laravel/laravel blog-laravel
composer create-project --prefer-dist laravel/laravel lar “5.5.*”
开始一个 yii 项目:
composer create-project yiisoft/yii2-app-basic blog-yii --prefer-dist
安装插件
直接在目录下面命令执行 composer require smarty/smarty 即可。
安装"phpoffice/phpword": "0.14.0"
"require": {
"php": ">=5.6.0",
"topthink/framework": "5.1.*",
"smarty/smarty": "^3.1",
"phpoffice/phpword": "0.14.0"
},
composer update
标签:dist,Composer,Windows,create,prefer,project,composer,安装 来源: https://blog.csdn.net/qq_34333717/article/details/98945826