利用composer安裝 yii沒有vendor目錄



Composer 進入官網, 選擇download 往下拉
找Manual Download

文件名應該是composer.phar吧,把這個粘貼到你的php的文件目錄下面

創建composer.bat

寫入

@ECHO OFF
php "%~dp0composer.phar" %*


composer安裝成功


 composer global require "fxp/composer-asset-plugin:~1.1.1"

 composer create-project yiisoft/yii2-app-basic basic 2.0.8


當出現

  1. Deprecation Notice: The Composer\Package\LinkConstraint\MultiConstraint class is  
  2.  deprecated, use Composer\Semver\Constraint\MultiConstraint instead. in phar://D  
  3. :/program/advanceYii/composer.phar/src/Composer/Package/LinkConstraint/MultiCons  
  4. traint.php:17  
  5. Deprecation Notice: The Composer\Package\LinkConstraint\LinkConstraintInterface  
  6. interface is deprecated, use Composer\Semver\Constraint\ConstraintInterface inst  
  7. ead. in phar://D:/program/advanceYii/composer.phar/src/Composer/Package/LinkCons  
  8. traint/LinkConstraintInterface.php:17  
  9. You are running composer with xdebug enabled. This has a major impact on runtime  
  10.  performance. See https://getcomposer.org/xdebug  
  11. You are already using composer version 1.2.1 (stable channel).  
時,只要刪除電腦裏的fxp目錄就可。

composer create-project yiisoft/yii2-app-basic basic 2.0.7

vendor是框架目。如果以上沒有解決,網站下載源碼。複製粘貼進去就好了。

the file or directory to be published does not exist bower/jquery/dist”

當碰到這個時候。可以修改框架源碼目錄

將目錄修改中成這樣,文件就找到了






發佈了22 篇原創文章 · 獲贊 12 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章