1. 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
  2. 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
  3. 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
  4. 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
  5. 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
Copyright © 2024. Powered by Intellect Software Ltd