Yii2.0-advanced Advanced Edition Project Construction (i)

Source: Internet
Author: User

Original link http://www.yii-china.com/post/detail/1.html

Project Construction:

  1. Click on "Resources download" above to download the yii2.0 Premium Framework required for this tutorial

  2. After the download, there is an advanced folder after decompression, open to get the directory as shown

  3. The description of the directory structure is not detailed here, we mainly know three directories backend (backstage), Common (public), frontend (foreground).

  4. Open C:\Windows\System32\drivers\etc\hosts to copy the following code into the Hosts file (for example)

    127.0.0.1 admin.demo.com 127.0.0.1 www.demo.com

  5. Copy the advanced project file extracted above to the environment root, configure access directory, open \apache\conf\extra\httpd-vhosts.conf (restart Apache service after modification)

       <VirtualHost *:80>            documentroot  "F:\pro\advanced\frontend\web"             ServerName www.demo.com            serveralias www.demo.com    </virtualhost>       <virtualhost *:80>           documentroot   "F:\pro\advanced\backend\web"             Servername admin.demo.com           serveralias  admin.demo.com    </virtualhost> 

       Note: F:\pro is my local environment root directory, Depending on the actual situation of the respective environment

  6. Adding Php.exe to System environment variables

    Steps:

    1. Right-click My Computer-Properties-advanced-environment variables

    2. Find the path (may need to scroll down to find), the mouse double-click the path, in the end to add your PHP directory and the class library where the path, including the previous ";" (For example:; C:\php; C:\php\ext)

    3. Click the "New" button and enter "PHPRC" in "Variable name" to enter the directory where the php.ini file is located (for example: C:\php) in the variable value, this step is to let Windows find php.ini.

    4. Run cmd into the installation directory, execute init or run Init.bat in the installation directory, select 0 Development mode for installation

  7. Open the browser to access http://www.demo.com can see the foreground interface, http://admin.demo.com is the background interface (there is a login interface)

  8. Original link http://www.yii-china.com/post/detail/1.html

Yii2.0-advanced Advanced Edition Project Construction (i)

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.