Here Install and Setup Yii Framework in PHP

View: 397    Dowload: 0   Comment: 0   Post by: hanhga   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.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 397

Comment:

To comment you must be logged in members.

Files with category

  • SimpleXML is a PHP extension that allows us to easily manipulate and get XML data

    SimpleXML is a PHP extension that allows us to easily manipulate and get XML data

    View: 113    Download: 0   Comment: 0

    Category: Php&mySql     Fields: none

    SimpleXML provides an easy way of getting an element's name, attributes and textual content if you know the XML document's structure or layout. SimpleXML turns an XML document into a data structure you can iterate through like a collection of arrays...

  • How to use the PHP download file script? Class Download PHP

    How to use the PHP download file script? Class Download PHP

    View: 82    Download: 0   Comment: 0

    Category: Php&mySql     Fields: Other

    This is my favorite PHP download script. I’ve used a different more simple method until a client wanted to be able to allow their site visitors to download a large file from a password protected directory. The PHP script works on Apache web servers...

  • Installing OCI8 & PHP 7.2 on RHEL or CentOS 6

    Installing OCI8 & PHP 7.2 on RHEL or CentOS 6

    View: 227    Download: 0   Comment: 0

    Category: Php&mySql     Fields: Other

    You’ll need to stop Apache (web server) using the following command. In any Linux commands I show in this article, it presumes you aren’t logged in as the root user, so you will need to use sudo to issue privileged commands.

  • PHP source code: get content of google search

    PHP source code: get content of google search

    View: 189    Download: 2   Comment: 0

    Category: Php&mySql     Fields: Other

    How to get the results of google search and display on your website. This PHP code can do that. Refer to the following code.

  • PHP as a Scripting Language for C#

    PHP as a Scripting Language for C#

    View: 127    Download: 0   Comment: 0

    Category: Php&mySql     Fields: none

    When creating .NET applications (including desktop and web applications), it may be useful to allow extending the application using some scripting language. The users of the application can write simple scripts to configure the application, modify...

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

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

    View: 4200    Download: 0   Comment: 0

    Category: Php&mySql     Fields: Other

    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

    How to MySqli Tutorial PHP MySqli Extension

    View: 495    Download: 0   Comment: 0

    Category: Php&mySql     Fields: Other

    PHP provides three api to connect mysql Database.

  • Make Laravel Artisan Commands

    Make Laravel Artisan Commands

    View: 470    Download: 0   Comment: 0

    Category: Php&mySql     Fields: Other

    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.

 
File suggestion for you
File top downloads
Codetitle.net - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.net Develope by Vinagon .Ltd