日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

win10使用Composer-Setup安装Composer以及使用Composer安装Yii2最新版

發(fā)布時(shí)間:2023/12/18 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 win10使用Composer-Setup安装Composer以及使用Composer安装Yii2最新版 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

1:下載?ca-bundle.crt和cacert.pem(見導(dǎo)航欄——文件)

將這兩個(gè)文件放在php目錄下

2:php.ini中添加上述兩個(gè)文件的路徑

curl.cainfo=C:/xampp/php/ca-bundle.crt
openssl.cafile=C:/xampp/php/ca-bundle.crt

寫到最后一行就可以

3:下載Composer-Setup.exe

https://getcomposer.org/download/

在該頁(yè)面找到Composer-Setup.exe并下載安裝(要求能vpnFQ)

4:安裝如果出現(xiàn)錯(cuò)誤

Notice: Undefined variable:?caBundle?in - on line 892

出現(xiàn)該錯(cuò)誤的時(shí)候,找到錯(cuò)誤路徑打開install文件,找到892行

紅線的地方報(bào)caBundle未定義,手動(dòng)改成如下:

改完之后保存文件,并且退出Composer-Setup.exe(不要繼續(xù)安裝),然后重新安裝,不報(bào)錯(cuò),走完安裝過(guò)程

5:驗(yàn)證安裝結(jié)果:

6:安裝Yii2

在服務(wù)器上建立訪問目錄yii2,

在github的個(gè)人信息的設(shè)置上生成一個(gè)token,后面創(chuàng)建項(xiàng)目的時(shí)候提示token(hidden)的時(shí)候?qū)⑦@個(gè)token復(fù)制上去

參照

http://www.yiiframework.com/download/

安裝Yii2的最新版本,

注意要將下面這兩行創(chuàng)建命令

php composer.phar global require "fxp/composer-asset-plugin:~1.1.1" php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.6
改為: composer global require "fxp/composer-asset-plugin:~1.1.1" composer create-project yiisoft/yii2-app-basic basic 2.0.6
如果是advanced項(xiàng)目: composer create-project yiisoft/yii2-app-advanced advanced 2.0.6

然后等待安裝,cmd顯示如下:

Microsoft Windows [版本 10.0.10240] (c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\jzzq>cd C:\xampp\htdocs\yii2

C:\xampp\htdocs\yii2>php composer.phar global require "fxp/composer-asset-plugin:~1.1.1" Could not open input file: composer.phar

C:\xampp\htdocs\yii2>composer self-update You are already using composer version 03299ff075236be27be356498d6c64def973fe41.

C:\xampp\htdocs\yii2>php composer.phar global require "fxp/composer-asset-plugin:~1.1.1" Could not open input file: composer.phar

C:\xampp\htdocs\yii2>composer global require "fxp/composer-asset-plugin:~1.1.1" Changed current directory to C:/Users/jzzq/AppData/Roaming/Composer Deprecation Notice: The Composer\Package\LinkConstraint\MultiConstraint class is deprecated, use Composer\Semver\Constraint\MultiConstraint instead. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/LinkConstraint/MultiConstraint.php:17 Deprecation Notice: The Composer\Package\LinkConstraint\LinkConstraintInterface interface is deprecated, use Composer\Semver\Constraint\ConstraintInterface instead. in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php:17 ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) ? - Removing fxp/composer-asset-plugin (v1.0.3) ? - Installing fxp/composer-asset-plugin (v1.1.1) ??? Downloading: 100%

Writing lock file Generating autoload files

C:\xampp\htdocs\yii2>php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.6 Could not open input file: composer.phar

C:\xampp\htdocs\yii2>composer create-project yiisoft/yii2-app-basic basic 2.0.6 Installing yiisoft/yii2-app-basic (2.0.6) ? - Installing yiisoft/yii2-app-basic (2.0.6) ??? Loading from cache

Created project in basic Loading composer repositories with package information Installing dependencies (including require-dev) ? - Installing yiisoft/yii2-composer (2.0.3) ??? Loading from cache

? - Installing ezyang/htmlpurifier (v4.6.0) ??? Loading from cache

? - Installing bower-asset/jquery (2.1.4) ??? Loading from cache

? - Installing bower-asset/yii2-pjax (v2.0.5) ??? Loading from cache

? - Installing bower-asset/punycode (v1.3.2) ??? Loading from cache

? - Installing bower-asset/jquery.inputmask (3.1.63) ??? Loading from cache

? - Installing cebe/markdown (1.1.0) ??? Loading from cache

? - Installing yiisoft/yii2 (2.0.6) ??? Loading from cache

? - Installing swiftmailer/swiftmailer (v5.4.1) ??? Loading from cache

? - Installing yiisoft/yii2-swiftmailer (2.0.4) ??? Loading from cache

? - Installing yiisoft/yii2-codeception (2.0.4) ??? Loading from cache

? - Installing bower-asset/bootstrap (v3.3.5) ??? Loading from cache

? - Installing yiisoft/yii2-bootstrap (2.0.5) ??? Loading from cache

? - Installing yiisoft/yii2-debug (2.0.5) ??? Loading from cache

? - Installing bower-asset/typeahead.js (v0.10.5) ??? Loading from cache

? - Installing phpspec/php-diff (v1.0.2) ??? Loading from cache

? - Installing yiisoft/yii2-gii (2.0.4) ??? Loading from cache

? - Installing fzaninotto/faker (v1.5.0) ??? Loading from cache

? - Installing yiisoft/yii2-faker (2.0.3) ??? Loading from cache

fzaninotto/faker suggests installing ext-intl (*) Writing lock file Generating autoload files > yii\composer\Installer::postCreateProject chmod('runtime', 0777)...done. chmod('web/assets', 0777)...done. chmod('yii', 0755)...done.

C:\xampp\htdocs\yii2>composer create-project yiisoft/yii2-app-advanced advanced 2.0.6 Installing yiisoft/yii2-app-advanced (2.0.6) ? - Installing yiisoft/yii2-app-advanced (2.0.6) ??? Downloading: 100%

Created project in advanced Loading composer repositories with package information Installing dependencies (including require-dev) ? - Installing yiisoft/yii2-composer (2.0.3) ??? Loading from cache

? - Installing ezyang/htmlpurifier (v4.6.0) ??? Loading from cache

? - Installing cebe/markdown (1.1.0) ??? Loading from cache

? - Installing bower-asset/jquery (2.1.4) ??? Loading from cache

? - Installing bower-asset/jquery.inputmask (3.1.63) ??? Loading from cache

? - Installing bower-asset/punycode (v1.3.2) ??? Loading from cache

? - Installing bower-asset/yii2-pjax (v2.0.5) ??? Loading from cache

? - Installing yiisoft/yii2 (2.0.6) ??? Loading from cache

? - Installing swiftmailer/swiftmailer (v5.4.1) ??? Loading from cache

? - Installing yiisoft/yii2-swiftmailer (2.0.4) ??? Loading from cache

? - Installing yiisoft/yii2-codeception (2.0.4) ??? Loading from cache

? - Installing bower-asset/bootstrap (v3.3.5) ??? Loading from cache

? - Installing yiisoft/yii2-bootstrap (2.0.5) ??? Loading from cache

? - Installing yiisoft/yii2-debug (2.0.5) ??? Loading from cache

? - Installing bower-asset/typeahead.js (v0.10.5) ??? Loading from cache

? - Installing phpspec/php-diff (v1.0.2) ??? Loading from cache

? - Installing yiisoft/yii2-gii (2.0.4) ??? Loading from cache

? - Installing fzaninotto/faker (v1.5.0) ??? Loading from cache

? - Installing yiisoft/yii2-faker (2.0.3) ??? Loading from cache

fzaninotto/faker suggests installing ext-intl (*) Writing lock file Generating autoload files

C:\xampp\htdocs\yii2>

轉(zhuǎn)載于:https://www.cnblogs.com/caicaizi/p/5625435.html

創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來(lái)咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)

總結(jié)

以上是生活随笔為你收集整理的win10使用Composer-Setup安装Composer以及使用Composer安装Yii2最新版的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。