Question - 1
Base URL changes are being done in which file?
- setting.php
- index.php
- config.php
- None of these
Solutions
Answer- C
Question - 2
where we can set the default controller?
- setting.php
- index.php
- config.php
- routes.php
Solutions
Answer- D
Question - 3
Among below options which one not a hook in Codeigniter?
- pre_system
- post_controller
- pre_model
- cache_override
Solutions
Answer- C
Question - 4
routing file located in which folder in CodeIgniter?
- Controller
- config
- third-party
- assets
Solutions
Answer- B
Question - 5
How to set csrf token in codeIgniter
- $config['csrf_protection'] = TRUE;
- $config['csrf'] = TRUE;
- $config['csrf_add'] = TRUE;
- None of these
Solutions
Answer- A
Question - 6
How to set session data in codeIgniter?
- $this->session->set_userdata('some_name', 'some_value');
- $this->session->userdata('some_name', 'some_value');
- $this->session->add_userdata('some_name', 'some_value');
- $this->session->all_set_session('some_name', 'some_value');
Solutions
Answer- A
Question - 7
How to load a model in Codeigniter?
- $this->load->model->model_name
- $this->model->load('model_name');
- $this->load->model('model_name');
- None of these
Solutions
Answer- C
Question - 8
How to enable error log in Codeigniter?
- error_reporting=1
- $config['log_threshold'] = 1;
- $config['error'] = TRUE;
- ini_set('display_errors', 1);
Solutions
Answer- B
Question - 9
Which is the below of ORM supported by CodeIgniter Framework?
- DataMapper
- Doctrine
- Gas ORM
- All of Above
Solutions
Answer- D
Question - 10
How to remove session data in codeigniter?
- $this->session->unset_userdata('some_key');
- $this->session->delete_userdata('some_key');
- $this->session->unlink_userdata('some_key');
- $this->session->deset_userdata('some_key');
Solutions
Answer- A
Question - 11
How to initializing the Session?
- $config['session'] = TRUE;
- $this->load->library('session');
- $this->load->helper('session');
- $this->load->session();
Solutions
Answer- B
Question - 12
Which function is use to set the value of form input box ?
- set_value();
- setValue();
- value_set()
- $this->set->value();
Solutions
Answer- A
Question - 13
How to get the average mark from a Student table?
- $this->db->select_avg('mark');
- $this->db->avg('mark');
- $this-> select_avg('mark');
- None of these
Solutions
Answer- A
Question - 14
How to get last insert id after insert query in codeigniter?
- $this->db->insert_id();
- $this->insert_id();
- $this->db->insertid();
- $this->db->last_id();
Solutions
Answer- A
Question - 15
How to get the last executed query in Codeigniter?
- $this->db->lastquery();
- $this->db->last_query();
- $this->db->query_last();
- $this->last_query();
Solutions
Answer- B
Question - 16
Which one is the Entry point in codeigniter
- index.php
- .htacess
- controller.php
- config.php
Solutions
Answer- A
Question - 17
How to set flashdata in Codeigniter?
- $this->session->set_flashdata('message', 'This is a message.');
- $this->session->flashdata('message', 'This is a message.');
- $this->session->keep_flashdata('message', 'This is a message.');
- None of these
Solutions
Answer- A
Question - 18
In general Business logic or database related code is written in which file in codeigiter?
- model
- view
- controller
- helper
Solutions
Answer- A
Question - 19
Which class is used to calculate the time between two points in your application ?
- Profiling class
- Security class
- Benchmarking class
- None of these
Solutions
Answer- C
Question - 20
What is a helper in codeigniter?
- A Class
- group of function
- a library
- a controller
Solutions
Answer- B
Practice more set questions