Skip to main content

PHP Codeigniter Quiz

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

Comments

Popular posts from this blog

New software continuously scrambles code to foil cyber attacks: Technique sets a deadline on hackers to severely limit chances of success

New software continuously scrambles code to foil cyber attacks: Technique sets a deadline on hackers to severely limit chances of success : As long as humans are writing software, there will be coding mistakes for malicious hackers to exploit. A single bug can open the door to attackers deleting files, copying credit card numbers or carrying out political mischief. A new program called Shuffler tries to preempt such attacks by allowing programs to continuously scramble their code as they run, effectively closing the window of opportunity for an attack.
The board of Snapdeal is expected to meet tomorrow to discuss the potential sale of India's third largest e-commerce firm to larger rival Flipkart. Also, on the agenda will be getting Nexus Venture Partners (NVP), an early investor in Snapdeal, to agree to the sale deal. The seven-member board of Jasper Infotech, which operates Snapdeal, includes representation from investors SoftBank, Kalaari Capital and Nexus Venture Partners (NVP), as well as co-founders Kunal Bahl and Rohit Bansal. The valuation of Snapdeal is believed to be one of the hurdles to the deal, as Kalaari and NVP were not in agreement with the valuation given by SoftBank, which is the largest shareholder in Snapdeal. SoftBank has now succeeded in getting Kalaari (another early-stage investor in Snapdeal) to agree but is yet to get NVP on board for the deal. The sources said once NVP agrees, the deal with Flipkart could be announced in a matter of weeks. The deal with Flipkart, if it happens, would