Codeigniter Interview Questions list for experienced
What is codeigniter ?
Who developed codeigniter?
Why codeigniter is called as loosely based mvc framework?
What are helpers?
What are hooks in codeigniter?
How to insert data into database table in CodeIgniter ?
How do I embed views within views? Nested templates? Header, Main, Footer (Blocks) design? Partials? Page Fragments? Ruby on Rails style Yield functionality?
How to Preparing Database for CodeIgniter ?
How do I pass parameters to a controller\'s index() function?
How do I do a COUNT(\'foo\') using the Active Record functions?
How to Install CodeIgniter ?
How do I call one Controller\'s methods from a different Controller?
Can I cache only certain parts of a page?
Can I extend the core Database class?
How do I call methods in one controller via another controller?
How do I find out the ID of the row I just inserted?
How do I see the actual raw SQL query generated by CI\'s Active Record
How to Create Application at CodeIgniter ?
How to Install CodeIgniter Framemwork
I keep repeating lumps of code - things like login-dialogs, stylesheets, headers, footers, or menus - is there some place I can define them just once?
Is there a way to cycle $this->input->post() items?
Tell me the Setting Database Configuration
How do I migrate my existing \'normal\' PHP site to CodeIgniter?
Is CodeIgniter uses a functions and names in its operation?
How do I call one Model\'s methods from a different Model?
1- What is codeigniter?
2- What are the features of codeigniter?
3- Explain Codeigniter File Structure?
4- Explain Application Flow Chart in codeigniter?
5- Explain MVC in Codeigniter?
6- What are the hooks in codeigniter?
7. How you will load an model in codeigniter?
8- What are the helpers in codeigniter?
9- How you will use or add codeigniter libraries?
10. How you will work with error handling in codeigniter?
1) Explain what is CodeIgniter?
2) Explain what are hooks in CodeIgniter?
3) Explain how you will load or add a model in CodeIgniter?
4) Explain what helpers in CodeIgniter are and how you can load a helper file?
Explain routing in Codeigniter?
Why is there a need to configure the URL routes?
List out different types of hook point in Codeigniter?
Mention what are the security parameter for XSS in CodeIgniter?
Explain how you can link images/CSS/JavaScript from a view in code igniter?
Explain what is inhibitor in CodeIgniter?
Mention what is the default URL pattern used in Codeigniter framework?
Explain how you can extend the class in Codeigniter?
Explain how you can prevent CodeIgniter from CSRF?
Explain how you can enable CSRF (Cross Site Request Forgery) in CodeIgniter?
Explain Codeigniter File Structure.
Explain Application Flow Chart in codeigniter.
Explain MVC in Codeigniter.
Codeigniter interview questions and answers on advance and basic Codeigniter with example so this page for both freshers and experienced condidate. Fill the form below we will send the all interview questions on Codeigniter also add your Questions if any you have to ask and for apply
in Codeigniter Tutorials and Training course just send a mail on info@pcds.co.in in detail about your self.
Top Codeigniter interview questions and answers for freshers and experienced
What is Codeigniter ?
Answer :
Questions : 1 :: What is codeigniter ?
Codeigniter is a framework which is mainly focussed on web application development .It is well known for its performance speed.It has inbuilt libraries which helps to build web application...View answers
Questions : 2 :: Who developed codeigniter?
Codeigniter was developed bt ellislab Inc.
Questions : 3 :: Why codeigniter is called as loosely based mvc framework?
Reason behind this is we does not need to follow strict mvc pattern while creating application.We can also able to build with model only view and controllers are enough to built a application.
Questions : 4 :: What are helpers?
It is a group of functions which helps you to do particular functions. Example there are form helper to create a form .$this->load->helper(‘form’);
Questions : 5 :: What are hooks in codeigniter?
Hooks are used to modify the inner functionality of framework without affecting core files.Hooks are present in application/config/hooks.php
Questions : 6 :: How to insert data into database table in CodeIgniter ?
Step1 This will be your controller.
<?phpclass Site extends CI_Controller{function index(){$this->load->view(‘form.php’);// loading form view}function...View answers
Questions : 7 :: How do I embed views within views? Nested templates? Header, Main, Footer (Blocks) design? Partials? Page Fragments? Ruby on Rails style Yield functionality?
There are several other described ways to deal with this problem:
Version 1.6 (Released January 31, 2008) has support for multiple views. See the User Guide for more details. That change to the core...View answers
Questions : 8 :: How to Preparing Database for CodeIgniter ?
Create a database named "codeigniter" and a table named "hello". We use phpMyAdmin for easy.
Open your phpmyadmin.
Enter database name "codeigniter" in create new database field.
Click...View answers
Questions : 9 :: How do I pass parameters to a controller's index() function?
The obvious problem is that a second parameter on the URL will be interpreted as the method name.
Short answer - use a URL like this: /controller/index/param1/param2
Long answer - using _remap()...View answers
Questions : 10 :: How do I do a COUNT('foo') using the Active Record functions?
You need to use the SQL AS feature, where you assign a new name to a piece of data. For example:
$this->db->select("COUNT('foo') AS foo_count", FALSE);// Run your query, and then use the...View answers
Questions : 11 :: How to Install CodeIgniter ?
CodeIgniter is installed in four steps:
Unzip the package.Upload the CodeIgniter folders and files to your server. Normally the index.php file will be at your root.Open the...View answers
Questions : 12 :: How do I call one Controller's methods from a different Controller?
Short answer: You don't
Wrong answer: Use the $CI = get_instance() trick.
Long answer: You shouldn't actually be trying to do this. It implies that your design isn't quite right, but on the...View answers
Questions : 13 :: Can I cache only certain parts of a page?
This is related to the question above about nested templates and partials. Basically, CI cache library (1.5.4) only supports full page caching - it's all or nothing. There are several...View answers
Questions : 14 :: Can I extend the core Database class?
No, you can not. This is quite explicitly described in the Creating Libraries section of the user guide: [quote]
The Database classes can not be extended or replaced with your own classes, nor can...View answers
Questions : 15 :: How do I call methods in one controller via another controller?
Often this question disguises a requirement for some shared methods - consult the earlier question on **View Partials* and Header/Footer/Menu common views first, and confirm your question isn't...View answers
Questions : 16 :: How do I find out the ID of the row I just inserted?
(Just so that people searching for this will be more likely to find it, we'll mention that this is comparable to the native PHP mysql_insert_id() function.)
$foo =...View answers
Questions : 17 :: How do I see the actual raw SQL query generated by CI's Active Record
You can do this before your query:
$this->db->_compile_select();
.. and then this, once you've run the query:
$this->db->last_query();
Questions : 18 :: How to Create Application at CodeIgniter ?
First, we make controller, create a file name "hello.php" within: systemapplicationcontrollers. Enter following code:
Next step, make a view. Create you_view.php within...View answers
Questions : 19 :: How to Install CodeIgniter Framemwork
CodeIgniter Step By Step Tutorial: After understand about codeIgniter at this, now, we learn how to install CodeIgniter. We will install to our local computer. Before follow this instruction, please...View answers
Questions : 20 :: I keep repeating lumps of code - things like login-dialogs, stylesheets, headers, footers, or menus - is there some place I can define them just once?
this is also covered by the next section (on nested templates, view partials etc) which in turn contains many links into the forums - this will provide a wealth of alternative approaches.
It is also...View answers
Questions : 21 :: Is there a way to cycle $this->input->post() items?
There are no CodeIgniter functions to do this, but you can accomplish this easily with a construct such as this one. The result of this function is a $safe_post_array that contains all posted data...View answers
Questions : 22 :: Tell me the Setting Database Configuration
open database.php within CodeIgnitersystemapplicationconfig. Set config Make sure, it match with your database.
Questions : 23 :: How do I migrate my existing 'normal' PHP site to CodeIgniter?
Put the whole site in a subfolder of your root web folder, and use .htaccess to rewrite all requests to the subfolder (we named it ‘oldsite’ but any name will...View answers
Questions : 24 :: Is CodeIgniter uses a functions and names in its operation?
CodeIgniter uses a series of functions and names in its operation. Because of this, some names cannot be used by a developer. Following is a list of reserved names that cannot be used.Controller...View answers
Questions : 25 :: How do I call one Model's methods from a different Model?
Short answer: You don't
Long answer: You shouldn't actually be trying to do this. It implies that your design isn't quite right. (Your design may be right - I'm just saying that this implies...View answers
Questions : 26 :: 1- What is codeigniter?
CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web...View answers
Questions : 27 :: 2- What are the features of codeigniter?
1. Codeigniter is free to use,its an open source framework.
2. Model-View-Controller Based System.
3. Extremely Light Weight.
4. Full Featured database classes with support...View answers
The following graphic illustrates how data flows throughout the system:
The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter.
The Router...View answers
Questions : 30 :: 5- Explain MVC in Codeigniter?
CodeIgniter is based on the Model-View-Controller development pattern. MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain...View answers
Questions : 31 :: 6- What are the hooks in codeigniter?
CodeIgniter's Hooks feature provides a means to tap into and modify the inner workings of the framework without hacking the core files. When CodeIgniter runs it follows a specific execution process,...View answers
Questions : 32 :: 7. How you will load an model in codeigniter?
$this->load->model('Modelname');
Questions : 33 :: 8- What are the helpers in codeigniter?
Helpers, as the name suggests, help you with tasks. Each helper file is simply a collection of functions in a particular category. There are URL Helpers, that assist in creating links, there are...View answers
Questions : 34 :: 9- How you will use or add codeigniter libraries?
When we use the term "Libraries" we are normally referring to the classes that are located in the libraries directory and described in the Class Reference of this user guide. In this case, however,...View answers
Questions : 35 :: 10. How you will work with error handling in codeigniter?
CodeIgniter lets you build error reporting into your applications using the functions described below. In addition, it has an error logging class that permits error and debugging messages to be saved...View answers
Questions : 36 :: 1) Explain what is CodeIgniter?
Codeigniter is an open source framework for web application. It is used to develop websites on PHP. It is loosely based on MVC pattern, and it is easy to use compare to other PHP framework.
Questions : 37 :: 2) Explain what are hooks in CodeIgniter?
Codeigniter’s hooks feature provides a way to change the inner working of the framework without hacking the core files. In other word, hooks allow you to execute a script with a particular path...View answers
Questions : 38 :: 3) Explain how you will load or add a model in CodeIgniter?
Within your controller functions, models will typically be loaded; you will use the function
$this->load->model (‘Model_Name’);
Questions : 39 :: 4) Explain what helpers in CodeIgniter are and how you can load a helper file?
In CodeIgniter, helpers are group of function in a particular category that assist you to perform specific functions. In CodeIgniter, you will find many helpers like URL helpers- helping in creating...View answers
Questions : 40 :: Explain routing in Codeigniter?
In CodeIgniter, the way PHP files served is different rather than accessing it directly from the browser. This process is called routing. Routing in CodeIgniter gives you freedom to customize the...View answers
Questions : 41 :: Why is there a need to configure the URL routes?
Changing the URL routes has some benefits like
From SEO point of view, to make URL SEO friendly and get more user visits
Hide some URL element such as a function name, controller name, etc. from...View answers
Questions : 42 :: List out different types of hook point in Codeigniter?
Different types of hook point in Codeigniter...View answers
Questions : 43 :: Mention what are the security parameter for XSS in CodeIgniter?
Codeigniter has got a cross-site scripting hack prevention filter. This filter either runs automatically or you can run it as per item basis, to filter all POST and COOKIE data that come...View answers
Questions : 44 :: Explain how you can link images/CSS/JavaScript from a view in code igniter?
In HTML, there is no Codeigniter way, as such it is a PHP server side framework. Just use an absolute path to your resources to link images/CSS/JavaScript from a view in...View answers
Questions : 45 :: Explain what is inhibitor in CodeIgniter?
For CodeIgniter, inhibitor is an error handler class, using the native PHP functions like set_exception_handler, set_error_handler, register_shutdown_function to handle parse errors, exceptions, and...View answers
Questions : 46 :: Mention what is the default URL pattern used in Codeigniter framework?
Codeigniter framework URL has four main components in default URL pattern. First we have the server name and next we have the controller class name followed by controller function name and...View answers
Questions : 47 :: Explain how you can extend the class in Codeigniter?
To extend the native input class in CodeIgniter, you have to build a file named application/core/MY_Input.php and declare your class with
Class MY_Input extends CI_Input {
}
Questions : 48 :: Explain how you can prevent CodeIgniter from CSRF?
There are several ways to protect CodeIgniter from CSRF, one way of doing is to use a hidden field in each form on the website. This hidden field is referred as CSRF token; it is nothing but a...View answers
Questions : 49 :: Explain how you can enable CSRF (Cross Site Request Forgery) in CodeIgniter?
You can activate CSRF (Cross Site Request Forgery) protection in CodeIgniter by operating your application/config/config.php file and setting it to
$config [ ‘csrf_protection’] =...View answers
When you download Codeigniter you will see the following folder structure :-• applicationo cacheo Configo ...View answers
Questions : 51 :: Explain Application Flow Chart in codeigniter.
Application flow chart from Codeigniter documentaion1. The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter.2. The Router examines the HTTP request...View answers
Questions : 52 :: Explain MVC in Codeigniter.
Model–View–Controller (MVC) is an architecture that separates the representation of information from the user’s interaction with it.Controller:- The Controller serves as an...View answers
Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website.
If you are using this website then its your own responsibility to understand the content of the website