1. Question:Define CodeIgniter framework? 

    Answer

    CodeIgniter is based on the Model-View-Controller (MVC) development pattern. MVC is a software approach that separates application logic from presentation. In practice, it permits web pages to contain minimal scripting since the presentation is separate from the PHP scripting.

    1. Report
  2. Question:Define Model, View and Controller? 

    Answer
    Model: The Model represents data structures. Typically model classes will contain functions that help to retrieve, insert, and update information in database.View: The View is the information that is being presented to a user. A View will normally be a web page, but in CodeIgniter, a view can also be a page fragment like a header or footer. It can also be an RSS page, or any other type of "page".Controller: The Controller serves as an intermediary between the Model and the View, and any other resources needed to process the HTTP request and generate a web page.

    1. Report
  3. Question:What are helpers in CodeIgniter? 

    Answer

    Helper files are a collection of functions in a particular group. Helpers can be used within Models, Controller and View files.

    1. Report
  4. Question:What are plug-in for in CodeIgniter? 

    Answer

    Plug-ins work almost identically to helper. A plug-in usually provides a single function, plug-ins are intended to be created and shared by community.

    1. Report
  5. Question:Differentiate between helper and plug-in? 

    Answer


    The main difference is that a plug-in usually provides a single function, whereas a Helper is usually a collection of functions. Helpers are also considered a part of the core system; plug-ins are intended to be created and shared by our community.In loading the difference is

    $this->load->plugin(plugin name);

    $this->load->helper (file name of the helper);


    1. Report
  6. Question:Why the following files are used in codeigniter?
    a) config.php
    b) autoload.php
    c) database.php
    d) routes.php 

    Answer


    config.php:The Config class provides a means to retrieve configuration preferences. These preferences can come from the default config file (application/config/config.php) or from your own custom config files.

    autoload.php: If we find that we need a particular config file globally, we can have it loaded automatically by the system.

    database.php: CodeIgniter has a config file that lets store your database connection values (username, password, database name, etc.). The config file is located at: application/config/database.php

    routes.phpRouting rules are defined in application/config/routes.php file. That permits to specify own routing criteria.

    1. Report
  7. Question:What are codeigniter URL segments? 

    Answer


    CodeIgniter’s URLs are simply segments. These segments are then split up and used to load a particular controller and method. CodeIgniter uses a segment-based approach:

    example.com/news/article/my_article


    1. Report
  8. Question:List the codeigniter system classes. 

    Answer
    The following is a list of the core system files that are invoked every time CodeIgniter runs:

    Benchmark
    Config
    Controller
    Exceptions
    Hooks
    Input
    Language
    Loader
    Log
    Output
    Router
    URI

    1. Report
  9. Question:What is unit testing? 

    Answer

    Unit testing is an approach to software development in which tests are written for each function in your application. CodeIgniter's Unit Test class is quite simple, consisting of an evaluation function and two result functions.

    1. Report
  10. Question:What is xss filtering? 

    Answer
    The Input and Security Class comes with a Cross Site Scripting hack prevention filter, which can be run on a per-item basis, or can be set to filter all POST and COOKIE data automatically.

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