How do you put Yii2 in an empty folder with Composer?



  • I want you to. yii2 by Composer

    1. Created the file.
    2. I did it in the file. Composer init
    3. Then Composer install
    4. Then composer global require "fxp/composer-asset-plugin:^1.2.0"
    5. Now I want to download Yii into the folder so that there's a hierarchy of myProject/Iii files.
    6. With the cd, I'm going to the general folder, with the help of ls, see myProject folder.
    7. Making composer create-project --prefer-dist yiisoft/yii2-app-basic myProject

    But I get a mistake. Project directory myProject/ is not empty

    How do you do it right?



  • Why in the file? composer init and composer install ?

    If you want to set up an ii2 in myProject file,

    1. Setting composer

      • curl -sS https://getcomposer.org/installer | php
      • mv composer.phar /usr/local/bin/composer
    2. Then put the flames globally composer global require "fxp/composer-asset-plugin:^1.2.0"

    3. composer create-project --prefer-dist yiisoft/yii2-app-basic basic (instead of path to your folder)

    4. Launch. php requirements.php

    5. Change the connection to the database

    More clearly https://yiiframework.com.ua/ru/doc/guide/2/start-installation/

    If you have one, composer and flame fxp/composer-asset-pluginthe first two points to pass.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2