Yii2 related learning record, download Yii2 (i), record yii2_php tutorial

Source: Internet
Author: User

Yii2 related learning record, download Yii2 (i), record yii2

Originally learned the relevant knowledge of YII1, although also half understand, but a little structure is understood. Now use the time of the evening to learn the use of YII2, planning to build a back-office management system, here to record, lest they forget later.

At present, we have seen some of Yii2 's authoritative guidelines, although the authority of the Chinese site, and the English version of the yiiframework compared to some of the missing content, but also a general understanding of what concrete can do, use a function to look carefully, of course, English is good or suggested to see English version, relatively new, compared to the whole. By the way, I read the "story with the Yii Framework" series video on the web, which speaks very well.

There is more important is the need to FQ with Google, after all, is a foreign framework, Chinese content is relatively small, most of the answers can be found in Google, here can be used xx-net, specific how to use their own to see the explanation it

First is the installation, here with the Yii2 advanced template, and not recommended to use local, since there is composer to learn new things:

1, composer Code Warehouse, here can find Yii2 all things, like in the search box enter "yiisoft/yii2-app-advanced", this is the YII2 advanced template we are looking for. This code base is corresponding to GitHub, you can view the GitHub address in the upper-right corner and see how to install Yii2.

2, download composer, of course, because of the wall, with composer may be unable to use. Here need to use the Chinese mirror, some images have been stopped to update, as of today (2016/03/27), is available is this composer China full-volume mirror, according to the use of instructions should be available.

The above two configuration should be ready to download Yii2 with composer. Installation problems encountered (under Windows system):

1. The following error will occur:

Fatal error:call to undefined method fxp\composer\assetplugin\package\version\versionparser::p arselinks<> ....

You can view this: https://github.com/yiisoft/yii2/issues/9794, that is, delete the "FXP" folder under the relevant directory, and then follow the steps again.

2, under Windows installation, a situation may have to enter the GitHub account password and token, this is to register a GitHub account, and then in the "Personal Center", "Settings", "Personal access Tokens" To generate a token on the line, but also encountered a situation that the ' git ' command is not recognized, you need to download the GitHub client to try, not likely to need git into the environment variable

3. You may encounter this when the installation is complete:

file or directory to is published does not exist:e:\www\yii2\yii2test1/vendor\bower/jquery/dist

This may be when you enter a similar statement as follows:

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

The wrong version number, which causes the directory location error, one way is to re-enter the correct version, and then

Composer self-updatecomposer global updatecomposer update

The other method is also the current requirement of the file under Vendor\bower\bower-asset, so the following jquery file is copied to the previous directory can also be run correctly. But it is best to use the first method, the second one does not know that there are no side effects.

Installation basically so, although very laborious, but learning new method is also good, anyway encountered problems on Baidu or Google walk. The concrete composer usage, oneself also did not grasp, uses when searches again. In this way, go to the ball first, Koko!

http://www.bkjia.com/PHPjc/1114013.html www.bkjia.com true http://www.bkjia.com/PHPjc/1114013.html techarticle YII2 related study record, download Yii2 (a), record Yii2 originally learned Yii1 of related knowledge, although also half understand, but a little structure is understood. Now take advantage of the night's ...

  • Related Article

    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.