Yii2 learning Records, download Yii2 (1), record yii2_PHP tutorial

Source: Internet
Author: User
Download the learning records of Yii2 (1) and record Yii2. Download Yii2 (1) and record Yii2's learning history. although it is not understandable, it is understandable to have a slight structure. Download Yii2 (1) and record Yii2 using the learning records of yii2 at night

I have previously learned about Yii1. although I am not familiar with Yii1, I understand the structure slightly. Now I want to learn how to use Yii2 at night and plan to build a background management system. here I will record it to avoid forgetting it later.

At present, I have read some authoritative guides of Yii2. although the authority of the Yiiframework Chinese website has some missing chapters compared with the English version, I can also get a general idea of what I can do. I should take a closer look when using a function, of course, if the English version is good, we recommend that you read the English version. it is relatively new and comprehensive. By the way, I watched the MOOC online series of "stories that have to be told by Yii Framework" and spoke very well.

What's more important is that google is needed for FQ. after all, it is a foreign framework with fewer Chinese content. most of the answers can be found in google, where XX-Net can be used, let's take a look at the specifics.

First, install the Yii2 advanced template. We do not recommend using the local template. now that you have composer, learn new things:

1. composer code repository, where you can find everything in Yii2, like entering "yiisoft/yii2-app-advanced" in the search box, this is the Yii2 advanced template we are looking. This code library corresponds to github. you can view the github address in the upper-right corner and view instructions on installing Yii2.

2. download composer. of course, you may not be able to use composer because of the wall. Here we need to use a Chinese image. Some images have been updated. as of today (), this composer Chinese full image is available, which should be ready for use according to instructions.

After the above two configurations, you can use composer to download Yii2. Installation problems (in windows ):

1. the following error occurs:

Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\VersionParser::parseLinks<> ....

You can view this: example.

2. During windows installation, you may need to enter the github account password and token. this is to register a github account, you can generate a token in "Personal center"> "Settings"> "Personal access tokens". you also encounter a situation where the 'Git 'command is not recognized, you need to download the github client. if not, you may need to add git to the environment variable.

3. this problem may occur after the installation is complete:

Invalid Parameter – yii\base\InvalidParamExceptionThe file or directory to be published does not exist: E:\www\yii2\yii2test1/vendor\bower/jquery/dist

This may be when the following statement is entered:

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

If the version number is incorrect, the directory location is incorrect. One way is to re-enter the correct version, and then

composer self-updatecomposer global updatecomposer update

Another method is to store the files that are currently required in the vendor \ bower-asset directory. Therefore, you can copy the following jquery files to the previous directory and run them normally. But it is best to use the first method, and the second method does not know whether there are any side effects.

The installation is basically like this. although it is very difficult, it is also good to learn the new method. baidu or google will start to solve any problem. I am not familiar with the specific usage of composer. I will try again later. In this case, I went to play the ball first, Coke!

Summary (1): record the previous knowledge of Yii1 in yii2. although it is not understandable, the structure is slightly understandable. Using the night...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.