Codeigniter MCQ | IDB-BISEW Codeigniter MCQ
![]() |
| Codeigniter MCQ- Youngheart.tk |
1. Which defines the bisiness logic?
- 1) Model
- 2) View
- 3) Controller
- 4) all
2. How can you load a model?
- 1) this->load->model();
- 2) this->load->model('mname');
- 3) $this->load->modelname();
- 4) $this->load->model('mname');
3. View represents-
- 1) template
- 2) page segment
- 3) Information that being presented in the screen
- 4) both a and c
- 5) all
4. Helper files are -
- 1) a collection of functions
- 2) a single function
- 3) a part of the core framework
- 4) both a and c
- 5) both b and c
5. To calculate the time between two points of the application which class is used?
1) Unit Testing
2) Session
3) Pagination
4) Banchmarking
6. Profiler class is used to -
- 1) upload file
- 2) retrieve session data
- 3) ouput benchmark result
- 4) none
7. Which configuration has to set for automatic filtering?
- 1) $config['global_xss_filter']=TRUE;
- 2) $config['global_xss_filtering']=FALSE;
- 3) $config['global_xss_filtering']=TRUE;
- 4) $config['global_xss_filte']=FALSE;
8. To retrieve get and post data which function is used?
- 1) getpost
- 2) postget
- 3) get_post
- 4) post_get
9. Which function is used to provide the information that the email has been sent or not?
- 1) debugger()
- 2) email_debugger()
- 3) print _debugger()
- 4) send_debugger()
10. To ensure that the input data is secure which function is used?
- 1) xss_secure
- 2) xss_clean
- 3) xss_filter
- 4) xss_security
11. To validate an email address which of the following is used?
- 1) Email Library
- 2) Email Helper
- 3) Form Validation Library
- 4) Form Helper
12. Which function of Email Heiper is used to send an email in simple way?
- 1) mail()
- 2) send()
- 3) send_mail()
- 4) send_email()
13. Which configuration is used to set allowed uploading file type?
- 1) $config['allow_types']
- 2) $config['allowed_type']
- 3) $config['allowed_types']
- 4) $config['allow_type']
14. Which session value is randomly generate?
- 1) user_id
- 2) session_id
- 3) last_activity
- 4) ip_address
15. What is output of the following code?
echo $this->unit->run('a123', 'is_numeric');
- 1) Passed
- 2) Failed
- 3) Error
- 4) Success
16. Which rule must be used for confirm password field?
- 1) required
- 2) alpha
- 3) matches[field_name]
- 4) all
17. Which function is used to convert php tags into entities?
- 1) prep_for _form
- 2) prep_url
- 3) encode_php
- 4) encode_php_tags
18. To change the error delimiter globally which of the following function used?
- 1) set_errors_delimeters
- 2) set_error_delimeter
- 3) set_error_delimeters
- 4) set_errors_delimeter
19. To return the data as a object which of the following is used?
- 1) $query->object()
- 2) $query->rows()
- 3) $query->result()
- 4) $query->array()
20. Which function is used to delete all data from a table?
- 1) delete_data()
- 2) delete_table()
- 3) empty_data()
- 4) empty_table()
21. To rename a table column using database forge which function is used?
- 1) rename_column()
- 2) change_column()
- 3) modify_column()
- 4) none
22. What is the function of password salt?
- 1) Make the password more secure
- 2) Make it harder to break the password
- 3) Easily generate the random password
- 4) both a and b
- 5) both a and c
23. Callback function is used with-
- 1) field
- 2) rule
- 3) query
- 4) none
24. Which library is used to validate the fields with different rule?
- 1) Form Library
- 2) Form validation Library
- 3) Form Validate Library
- 4) None
25. What is function of active record caching?
- 1) It retrieves the query data
- 2) It saves the query data for later use
- 3) It updates the query data
- 4) both a and b
26. Which function is used to add data into the database using active record?
- 1) add
- 2) insert
- 3) insert_data
- 4) insert_query
27. To get the first 10 records of product table name which of the following correct?
- 1) this->db->get('product',0,10)
- 2) $this->db->get('product',10,10)
- 3) $this->db->get('product',0,10)
- 4) this->db->get('product',10,0)
28. Which file is used to set database configuration?
- 1) config.php
- 2) autoload.php
- 3) database.php
- 4) model.php
29. Which rule is used to set fixed length for a form field?
- 1) min_length[x]
- 2) max_length[x]
- 3) exact_length[x]
- 4) fixed_length[x]
30. Which of the following option is used to see the full information of unit testing?
- 1) $this->unit->result()
- 2) $this->unit->report()
- 3) $this->unit->all_result()
- 4) $this->unit->all_report()
