Hot File

Here Install and Setup Yii Framework in PHP

View: 101    Dowload: 0   Comment: 0   Post by: hanhga  
Author: none   Category: Php&mySql   Fields: Other

0 point/0 review File has been tested

Yii is a very high performance PHP framework used for development of web applications. It’s free and open-source framework which follows MVC architecture

Introduction

Yii is a very high performance PHP framework used for development of web applications. It’s free and open-source framework which follows MVC architecture.So now you might be thinking that there is many other PHP MVC framework like Laravel, Symfony, Cake, Codeigniter etc. are available why i use yii framework.The best thing about Yii’s is it’s performance. Definitely If you are making highly-scalable web application then you can’t ignore this point.

Important Features of Yii Framework

1. Model-View-Controller (MVC) design pattern.

2. Database Access Objects (DAO), Query Builder, Active Record, DB Migration.

3. Authentication and authorization.

4. Form input and validation.

5. Web services.

6. Error handling and logging.

7. Security.

There are lot of features Yii framework offers. Check complete features and their descriptions.

How to Install and Setup Yii Framework

To install Yii framework, i assume you have LAMP setup and installed in your system.

After extracting zip ,let’s move to yii folder and navigate to project root directory. Now i am going to use yiic command line tool to create new project.

// Generate first application code through yiic
 
// This command create new directory with the name firstapp.
 
php yiic webapp ../firstapp
 
or
 
yiic webapp ../firstapp
 
Create a Web application under '/var/www/learn/yii/firstapp'? (yes|no) [no]:
 
 mkdir /var/www/learn/yii/firstapp
   generate index-test.php
      mkdir /var/www/learn/yii/firstapp/themes
      mkdir /var/www/learn/yii/firstapp/themes/classic
      mkdir /var/www/learn/yii/firstapp/themes/classic/views
      mkdir /var/www/learn/yii/firstapp/themes/classic/views/site
   generate themes/classic/views/.htaccess
      mkdir /var/www/learn/yii/firstapp/themes/classic/views/layouts
      mkdir /var/www/learn/yii/firstapp/themes/classic/views/system
      mkdir /var/www/learn/yii/firstapp/images
      mkdir /var/www/learn/yii/firstapp/assets
      mkdir /var/www/learn/yii/firstapp/css
   generate css/bg.gif
   generate css/form.css
   generate css/print.css
   generate css/ie.css
   generate css/main.css
   generate css/screen.css
      mkdir /var/www/learn/yii/firstapp/protected
   generate protected/yiic
      mkdir /var/www/learn/yii/firstapp/protected/views
      mkdir /var/www/learn/yii/firstapp/protected/views/site
      mkdir /var/www/learn/yii/firstapp/protected/views/site/pages
   generate protected/views/site/pages/about.php
   generate protected/views/site/contact.php
   generate protected/views/site/login.php
   generate protected/views/site/error.php
   generate protected/views/site/index.php
      mkdir /var/www/learn/yii/firstapp/protected/views/layouts
   generate protected/views/layouts/column2.php
   generate protected/views/layouts/main.php
   generate protected/views/layouts/column1.php
      mkdir /var/www/learn/yii/firstapp/protected/models
   generate protected/models/ContactForm.php
   generate protected/models/LoginForm.php
      mkdir /var/www/learn/yii/firstapp/protected/commands
      mkdir /var/www/learn/yii/firstapp/protected/commands/shell
      mkdir /var/www/learn/yii/firstapp/protected/components
   generate protected/components/UserIdentity.php
   generate protected/components/Controller.php
      mkdir /var/www/learn/yii/firstapp/protected/messages
   generate protected/yiic.php
   generate protected/.htaccess
      mkdir /var/www/learn/yii/firstapp/protected/extensions
      mkdir /var/www/learn/yii/firstapp/protected/runtime
      mkdir /var/www/learn/yii/firstapp/protected/tests
      mkdir /var/www/learn/yii/firstapp/protected/tests/unit
   generate protected/tests/WebTestCase.php
      mkdir /var/www/learn/yii/firstapp/protected/tests/report
   generate protected/tests/bootstrap.php
      mkdir /var/www/learn/yii/firstapp/protected/tests/functional
   generate protected/tests/functional/SiteTest.php
   generate protected/tests/phpunit.xml
      mkdir /var/www/learn/yii/firstapp/protected/tests/fixtures
   generate protected/yiic.bat
      mkdir /var/www/learn/yii/firstapp/protected/data
   generate protected/data/schema.mysql.sql
   generate protected/data/schema.sqlite.sql
   generate protected/data/testdrive.db
      mkdir /var/www/learn/yii/firstapp/protected/migrations
      mkdir /var/www/learn/yii/firstapp/protected/config
   generate protected/config/test.php
   generate protected/config/console.php
   generate protected/config/main.php
      mkdir /var/www/learn/yii/firstapp/protected/vendor
      mkdir /var/www/learn/yii/firstapp/protected/controllers
   generate protected/controllers/SiteController.php
   generate index.php

Your application has been created successfully under /var/www/learn/yii/firstapp.

Open this application on browser.

Now your installation is complete and your first application is ready. Go to firstapp directory you will find following files and folders.

index-test.php*
themes/
images/
css/
protected/
index.php
assets/

In next tutorial, i’ll explain directory structure and show you how to configure database, create controller and model in Yii framework.

Here Install and Setup Yii Framework in PHP

Here Install and Setup Yii Framework in PHP Posted on 04-10-2016  Yii is a very high performance PHP framework used for development of web applications. It’s free and open-source framework which follows MVC architecture 5/10 101

Comment:

To comment you must be logged in members.

Files with category

  • How to Picking the Brains of Your Customers with Microsoft’s Text Analytics

    View: 1659    Download: 0   Comment: 0   Author: none  

    How to Picking the Brains of Your Customers with Microsoft’s Text Analytics

    Category: Php&mySql
    Fields: Other

    5/1 review
    With the explosion of machine learning services in recent years, it has become easier than ever for developers to create “smart apps”. In this article, I’ll introduce you to Microsoft’s offering for providing machine-learning capabilities to apps.

  • How to MySqli Tutorial PHP MySqli Extension

    View: 129    Download: 0   Comment: 0   Author: none  

    How to MySqli Tutorial PHP MySqli Extension

    Category: Php&mySql
    Fields: Other

    0/0 review
    PHP provides three api to connect mysql Database.

  • Make Laravel Artisan Commands

    View: 123    Download: 0   Comment: 0   Author: none  

    Make Laravel Artisan Commands

    Category: Php&mySql
    Fields: Other

    0/0 review
    Artisan is the command line tool used in Laravel framework. It offers a bunch of useful command that can help you develop application quickly. Apart from Artisan available commands, you can create your own custom commands to improve your workflow.

  • Check if a Number is a Power of 2

    View: 111    Download: 0   Comment: 0   Author: none  

    Check if a Number is a Power of 2

    Category: Php&mySql
    Fields: Other

    2.25/2 review
    How to check if a number is a power of 2. To understand this question, let’s take some example.

  • Concatenate columns in MySql

    View: 139    Download: 0   Comment: 0   Author: none  

    Concatenate columns in MySql

    Category: Php&mySql
    Fields: Other

    0/1 review
    Artisan is the command line tool used in Laravel framework. It offers a bunch of useful command that can help you develop application quickly. Apart from Artisan available commands, you can create your own custom commands to improve your workflow

  • How to Query NULL Value in MySql

    View: 106    Download: 0   Comment: 0   Author: none  

    How to Query NULL Value in MySql

    Category: Php&mySql
    Fields: Other

    5/1 review
    Misunderstanding NULL is common mistake beginners do while writing MySql query. While quering in MySql they compare column name with NULL. In MySql NULL is nothing or in simple word it isUnknown Value so if you use comparison operator for NULL values...

  • How to Abstract Class in PHP

    View: 128    Download: 0   Comment: 0   Author: none  

    How to Abstract Class in PHP

    Category: Php&mySql
    Fields: Other

    0/0 review
    What is an abstract class in PHP and when to use an abstract class in your application. In this tutorial, we’ll learn about abstract class and their implementation.

  • Use Enums in Rails for Mapped Values

    View: 127    Download: 0   Comment: 0   Author: none  

    Use Enums in Rails for Mapped Values

    Category: Php&mySql
    Fields: Other

    5/1 review
    When I worked in a call center, we used to mark cases with different statuses. This allowed upper management to get a handle on where cases stood, what the bottlenecks were and flow of calls. Thankfully it has been a long time since I worked in a...

 
Newsletter Email

File suggestion for you

File top downloads

logo codetitle
Codetitle.com - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.com Develope by Vinagon .Ltd