Learn PHP recently and start looking for a framework that can be quickly started. At the beginning of the brother even video when the instructor recommended thinkphp. So I chose the thinkphp to try, the framework of the difficulty coefficient is not easy to develop a rapid application. Ideal for small business applications. Because it is developed by people, Chinese support is better. There are more comprehensive documents, the official website community is also more active. Because the projects I contacted were all Oracle databases, I wanted to find a PHP framework that was better for Oracle support, but the thinkphp framework was not very supportive of Oracle. So I changed the YII framework to try to support Oracle.
The YII framework now has a stable version of 1.1.14. Currently 2.0 is a beta version. Spent a few days learning the next YII1 to create an app. There are not many documents related to Yii. Most of them are in original English. However, support for Oracle is also available. AR technology is used. Recently read the documentation for the next Yii2. It joins PHP's namespace concept, joins the bootstrap, Smarty and many other useful functions. It's a lot better than YII1, and finally I decided to learn YII2 framework. Based on the understanding of YII1, YII2 should be better.
Today I finally figured out how to install YII2. It was a great struggle for my little white. Below is a description of how to install composer and how to install Yii2 using composer.
Composer is a tool used in PHP to manage dependency (dependency) relationships. You can declare your dependencies on the External tool Library (libraries) in your project, and composer will help you install these dependent library files.
Windows installation Composer:
First, download composer
Official website Download: https://getcomposer.org/download/
Ii. opening PHP support for OpenSSL
Modify the D:\WAMP\bin\php\php5.4.12 configuration file php.ini
Remove annotations;
Third, installation composer
The "Next" installation is complete.
After installation, you will be prompted to reopen the cmd command line to use.
Installing the yii2-advanced template
First, download yii2-advanced template
Official website Download: http://www.yiiframework.com/download/
Download complete Unzip to
D:\WAMP\www
Second, through composer installation
Open cmd, jump to Directory
D:\WAMP\www\advanced
Let's create an app called "Yii2test".
Enter the command:
Composer Create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced. /yii2test
Wait...... The following interface appears, indicating that the installation was successful.
Iii. Initializing the Project
Execute cmd command init
Test the installation Results
Address field input: http://localhost/yii2test/frontend/web/index.php
You will see the following interface:
Now that the installation Yii2 is complete, I will follow up on the learning progress of PHP framework Yii2.