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

Data Held for Ransom in 70 Countries; Massive Cyber Attack Hits Russia Hard

London:  A huge extortion cyberattack hit dozens of nations Friday, holding computer data for ransom at hospitals, telecommunications firms and other companies. The attack appeared to exploit a vulnerability purportedly identified for use by the US National Security Agency and later leaked to the internet. The attack hit Britain's health service, forcing affected hospitals to close wards and emergency rooms. Related attacks were reported in Spain, Portugal and Russia. Two security firms — Kaspersky Lab and Avast — said they had identified the malware behind the attack in upward of 70 countries, although both said the attack has hit Russia hardest. The Russian Interior Ministry has confirmed it was hit by the "ransomware" attack, which encrypts data on infected computers and demands payment, usually via digital currency bitcoin, to release it. Britain's health service was also hit hard Friday as the attack froze computers at hospitals across the country, ...

social media marketing

Leveraging the power of content and social media marketing can help elevate your audience and customer base in a dramatic way. But getting started without any previous experience or insight could be challenging. It's vital that you understand social media marketing fundamentals. From maximizing quality to increasing your online entry points, abiding by these 10 laws will help build a foundation that will serve your customers, your brand and -- perhaps most importantly -- your bottom line. 1. The Law of Listening Success with social media and content marketing requires more listening and less talking. Read your target audience’s online content and join discussions to learn what’s important to them. Only then can you create content and spark conversations that add value rather than clutter to their lives. 2. The Law of Focus It’s better to specialize than to be a jack-of-all-trades. A highly-focused social media and content marketing strategy intended ...