1. Question:What is Yii framework? 

    Answer
    Yii is a very flexible and high-performance application development framework written in PHP. It helps building web applications, from small to large-scale enterprise applications. The framework name stands for Yes It Is (Yii).          Page: 5






    1. Report
  2. Question:What are the features of yii framework? 

    Answer
    Features fo Yii are : 
    i. Model-View-Controller (MVC) design pattern
    ii. Database Access Objects (DAO), Query Builder, Active Record, DB Migration
    iii. Form input and validation
    iv. AJAX-enabled widgets
    v. Unit and functionality testing
    vi. Friendly with third-party code






    1. Report
  3. Question:What is MVC?/ Explain about model, view, controller? 

    Answer
    : Elaboration of MVC  is Model View Controller. It is a pattern for building application. The Model represents the application core (for instance a list of database records). The View displays the data (the database records) and The Controller is the business logic.






    1. Report
  4. Question:What is the first function that gets loaded from a controller? 

    Answer
    The first function that gets loaded from a controller is index(). 
    example:
    Public  function actionIndex()
    {
     /* write code here*/
    }






    1. Report
  5. Question:How to connect to the database in YII? 

    Answer
    To connect a database, you have  to edit the database .php file which is at yii\protected\config\database.php:
    
    <?php
    	'connectionString' => 'mysql:host=localhost;dbname=yii116',
    	'emulatePrepare' => true,
    	'username' => 'root',
    	'password' => '',
    	'charset' => 'utf8',	
    );






    1. Report
Copyright © 2025. Powered by Intellect Software Ltd