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

Microsoft to shut down MS Paint 32 years after its launch

Microsoft to shut down MS Paint 32 years after its launch Microsoft’s next Windows 10 update, called the Autumn (or Fall in the US) Creators Update, will bring a variety of new features. But one long-standing stalwart of the Windows experience has been put on the chopping block: Microsoft Paint. First released with the very first version of Windows 1.0 in 1985, Paint in its various guises would be one of the first graphics editors used by many and became a core part of Windows. Starting life as a 1-bit monochrome licensed version of ZSoft’s PC Paintbrush, it wasn’t until Windows 98 that Paint could save in JPEG. With the Windows 10 Creators Update, released in April, Microsoft introduced the new Paint 3D, which is installed alongside traditional Paint and features 3D image making tools as well as some basic 2D image editing. But it is not an update to original Paint and doesn’t behave like it. Now Microsoft has announced that, alongside Outlook Express, Reader app and Reading li...

WhatsApp cannot transfer its data to Facebook in Germany In a setback to the social networking giant, a German court has upheld its decision asking it to obtain the permission of WhatsApp users in the country before processing their personal data to Facebook.

BERLIN: In a setback to the social networking giant, a German court has upheld its decision asking it to obtain the permission of WhatsApp users in the country before processing their personal data to Facebook. The court also overturned Germany’s privacy regulator’s order that the companies delete data they had already transferred, a report in technology website InfoWorld said on Wednesday. Last August, Facebook-owned WhatsApp changed its privacy policy to allow the transfer of its users’ personal information to Facebook for processing — a move that has also created a furore in India. The move angered the Hamburg Commissioner for Data Protection and Freedom of Information, which in September ordered the companies to stop the transfer until they had obtained users’ consent and to delete any data they had already transferred, the report said. Facebook challenged the order in Hamburg’s administrative court and the court handed down its ruling. The court upheld the C...