Home > PHP Framework > YII > How to install yii framework

How to install yii framework

(*-*)浩
Release: 2019-11-14 15:50:33
Original
2657 people have browsed it

How to install yii framework

## Install composer through composer

## This is installed with Composer (Recommended learning: yii tutorial )

If Composer has not been installed, you can install it according to the method in getcomposer.org.

In Linux and Mac OS X you can run the following command:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Copy after login

In Windows, you need to download and run Composer-Setup.exe.

If you encounter any questions or want to learn more about Composer. If you have Composer installed, make sure you are using the latest version. You can use the composer self-update command to update Composer to the latest version.

All composer commands assume that you have installed composer globally so that it can be used as a composer command. If you are using composer.phar in a local directory, you must adjust the example commands accordingly.

If you have installed Composer before, make sure to use the latest version. You can update Composer by running composer self-update.

Installing Yii

After installing Composer, you can install the Yii application template by running the following command under a web-accessible folder:

composer create-project --prefer-dist yiisoft/yii2-app-basic basic
Copy after login

This will install the latest stable version of the Yii application template in a directory called basic. You can choose a different directory name if needed.

Tips: If you want to install the latest development version of Yii, you can use the following command instead, which adds a stability option

composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic
Copy after login

Please note that the development version of Yii Should not be used in production as it may break your running code.

The above is the detailed content of How to install yii framework. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template