1. Base URL can be changed from which configuration file:
a. database b. config c. routes d. autoload

2. default controller can be set from which configuration file:
a. database b. config c. routes d. autoload

3. Which configuration file is used to autoload resources?
a. database b. config c. routes d. autoload

4. Which one is the business logic in codeigniter?
a. model b. view c. controller d. helper

5. Which of the following in MVC can connect to database?
a. model b. view c. controller d. helper

6. In CI, the closing tag of PHP is optional.
a. true b. false

7. Which are false?
a. all codeigniter class name should start with uppercase and rest of the name should be in lowercase.
b. you can remap function calls by using a function in your controller called _remap()
c. view file cannot call other view files
d. you can pass data to a view file by using the third parameter of the load->view function.

8. Which variable name is incorrect?
a. $Text b. $f c. $user id d.$text e. $some-test-here

9. The keywords true, false, null should always be in lowercase letter in codeigniter.
a. true b. fasle

[Question 10-15] Consider the link:
10. What kind of link is this:
a. URI b. QueryString c. ftp link

11. The above URl is built on segments.
A. true B. false
12. Which one will be treated as parameter in that URI?
a. index.php b. somethingvone c. somethingvtwo d. somethingvthree

13. Which one will be treated as method in that URI?
a. index.php b. somethingvone c. somethingvtwo d. somethingvthree

14. Which one will be treated as controller in that URI?
a. index.php b. somethingvone c. somethingvtwo d. somethingvthree

15. Which one will control all the segments?
a. index.php b. somethingvone c. somethingvtwo d. somethingvthree

16. Which are true:
a. helper can only be loaded in controller and model. View cannot load helper
b. we cannot load multiple helper by passing an array of values to the first parameter.
c. Plugins are stored within system/application/plugins/ folder.
d. all codeigniter core libraries have the prefix CI_

17. Libraries are created so that they can be reused whenever needed.
a. true b. false

18. Benchmark can be added to model, view and controllers
a. true b. false

19. You can display the amount of memory used by the system by calling:
a. $this->benchmark->memory_use()
b. $this->memory_use()
c. $this->benchmark->memory_usage()
d. $this->memory_usage()

20. Which one is not true
a. we can set automatic filtering on by setting $config[‘global_xss_filtering’] to TRUE
b. We can check image for safety in optional second parameter to the xss clean function
c. The email class also serves as a wrapper class in CI
d. email can only be sent from controller

21. Which function is use to set the value of form input box ?
(a) setvalue()
(b) set()
(c) set_value()
(d) Non of above

22. How many parameters are set_rules function ?
(a) 4
(b) 3
(c) 2
(d) 5

23.Which is extremely useful and even though also optional ?
(a) Model
(b) View
(c) Controller
(d) Non of above

24. Which refers to the system of numbering pages-a list of numbered links ?
(a) Rotating
(b) Pagination
(c) Cropping
(d) All of above

25. What correct line of coded loading a view ?
(a) $this->load->view(‘view_name’)
(b) $this->view(‘view_name’)
(c) $this->load(‘view_name’)
(d) $this->load->view_name(‘view’)
26. What work in almost exactly the same way as Helpers ?
(a) Helper
(b) Plugin
(c) Library
(d) All of above

27.Which class is used to calculate the time between two points in your application ?
(a) Profiling class
(b) Security class
(c) Benchmarking class
(d) Non of above

28.Which key word is used callback function ?
(a) _callback
(b) callback_
(c) _callback_
(d) Non of above

29. Which of the following is/are fasle:
a. The third parameter in load->view function used for output buffering
b. The default batch size for bcc is 500
c. we can store data in session by calling set_userdata() method
d. to validate form we use the form library in CI.

30. CI session contains the following:
a. Session_ID
b. users IP address
c. user manager
d. first activity timestamp

Chapter: 1
1. What is codeigniter? What is singleton design pattern?
Ans. CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications.
The Singleton pattern ensures that a class has only one instance and provides a global point of access to that instance. It is named after the singleton set, which is defined to be a set containing one element.

2. Discuss Model-View-Controller(MVC) pattern.
The model-view-controller pattern proposes three main components or objects to be used in software development:
Model , which represents the underlying, logical structure of data in a software application and the high-level class associated with it. This object model does not contain any information about the user interface.
View , which is a collection of classes representing the elements in the user interface (all of the things the user can see and respond to on the screen, such as buttons, display boxes, and so forth)
Controller , which represents the classes connecting the model and the view, and is used to communicate between classes in the model and view.

3. Discuss the config files in codeigniter.

4. How to set the default controller?

5. How to configer database.

6. How to set the base URL?

7. How to load a view,model, database, librarary and helper files in codeigniter?

8. How to pass variable data from controller to a view file in codeigniter?

9. Which configuration file is used to autoload resources?

10. Discuss the php closing tag is codeigniter.

11. Discuss class, method and variable naming rules in codeigniter.

12. Why short opening tags is not allowed in codeigniter?

13. Disacuss the codeigniter URI.
14. What is the function of helper files? From where you can load helper files? How to load helper files?
15. What is plugin? How to load plugin?
16. Why library is used in codeigniter? How to load library?
Chapter 2:
1. What is a library? What do library do?
2. Discuss benchmark class.
3. Discuss input and security class.
4. How to set automatic filtering in CI?
5. How to retrieve get,post, cookie or server data in CI?
6. Discuss the email class. How to set from, to, cc, bcc, subject and message? How to send email?
7. Discuss the pagination class.
8. Discuss the session class.
9. What values are stored in a session by default?
10. How to add session data and retrieve session data.
11. How to unset and distroy session data.
Chapter 3:Form validation and database interaction
1. Why should we need to validate form?
2. How to load the form validation library?
3. List the form validation rules.
4. Discuss prepping data in CI.
5. Discuss set_value() and form_error() function.
6. What is callback function? How to call callback function in CI.
7. How to load database library? How to perform database query?
8. How to show database query result?
9. How to see how many records returned from a database query? How to free result?
10. Discuss active record in codeigniter:
i. How to show all the record in a table?
ii. How to put where clause in a query?
iii. How to select fields in a query?
iv. How to select from in a query?
v. How to use group by and order by?
vi. How to use limit.
vii. How to update data?
viii. How to delete record?
ix. How to delete all the record in a table?
11. What is method chaining?
Chapter 4: User authentication:
1. How to use anchor in codeigniter?
Chapter 6: Application Security
1. What is URI?How to get URI link in ($_SERVER[‘REQUEST_URI’];
2. Discuss the URI ‘index.php/controller/method/parameters’.
3. What’s the difference between URI and QUERY String in codeigniter.
4. Why does codeigniter restrict URI characters.
5. Write the security steps to accept any kind of data in your application.
6. Write the general rule for strong password pilicy.
7. What is hash? Name two popular hashing algorithm.
8. What is salting?
9. Discuss escape queries.
10. Discuss query building.
11. What is Cross-site scripting?
Chapter 8: Web Services
1. What is web service?
2. What is RPC?
3. What is RESTful web service?

Leave a comment

Your email address will not be published. Required fields are marked *