Home >Backend Development >PHP Tutorial >Introduction and simple deployment of Yii20 framework

Introduction and simple deployment of Yii20 framework

WBOY
WBOYOriginal
2016-07-28 08:28:481575browse

What is Yii?

High performance, component-based

What is Yii suitable for? , Large-scale applications, portals, communities, community, OMS, e-commerce, etc.

yii compared to other frameworks

1: Compared with other PHP frameworks, YII implements the MVC (Model-View-Controller) design mode and is based on this mode. Organization code.

2: Yii code is simple and elegant.

3: Yii is a full-stack framework that provides query builder and ActiveRecord for both relational and NoSQL databases; multi-layer caching support, etc.

4: Introduction to Yii code, high performance is always one of Yii’s primary goals.

Version:

Version 2.0 is a completely rewritten version, using the latest technologies and protocols, including dependency package manager Composer, PHP code specification PSR, namespace, Traits (traits), etc.

Yii2.0 requires PHP5.4 or above.

ii2.0 framework basic deployment (excluding database)

Yii2.0 framework advanced deployment

Download address: http://www.yiichina.com/download

Basic deployment: Enter

basic/web/index. php

If the following error is displayed

 Yii20框架的介绍和简单部署
, you need to add

'cookieValidationKey' => '107lab' in basic/config/web.php.

Note: You can write whatever you want in the following.

Advanced deployment:

Open init.bat in the advanced file, select 0, and enter yes

Note: If it crashes or displays

The OpenSSL PHP extension is required by Yii2.

you need to find yourself For the php.ini file in the wamp environment, remove

extension=php_openssl.dll, the semicolon in front, and then restart Apache

In the advanced version,

backend corresponds to the backend directory, and

frontend corresponds to the frontend directory. Directory structure

model: model

controller: controller

views: view

config: configuration file

web: stores entry files

vender: stores core class files of the framework and some extensions

runtime : Some files automatically generated when running

 Yii20框架的介绍和简单部署Note: If it crashes or displays
The OpenSSL PHP extension is required by Yii2.

, you need to find the php.ini file in your wamp environment and remove it

extension=php_openssl.dll, the semicolon in front, and then restart Apache

In the advanced version,

backend corresponds to the backend directory, and

frontend corresponds to the frontend directory. Directory structure

model: model

controller: controller

views: view

config: configuration file

web: stores entry files

vender: stores core class files of the framework and some extensions

runtime :Some files automatically generated when running

The above introduces the introduction and simple deployment of the Yii20 framework, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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
Previous article:nginx configurationNext article:nginx configuration