Tuesday, April 18, 2017

CodeIgniter Interview Questions & Answers

1) What is CodeIgniter?
CodeIgniter is an open source framework for web applications. This is used to develop a website in PHP. It is constantly based on the MVC pattern, and it is easier to use than other PHP frameworks.



2) Explain how you can prevent CodeIgniter from CSRF.
There are several ways to protect CodeIgniter from CSRF, one way to use a hidden field in every form of the website is. This hidden field is called as CSRF Token; this is not a random value that has been sent with each HTTP request modified. As it gets inserted into the website form, it is also saved in the user session. So, when the user submits the form, the website checks whether it is stored in the session. If this is the same, then the request is valid.


3) How can you explain the codesigner that you can enable CDRF (cross-site request fraud)?
You can activate the CSRF (cross-site request fraud) protection in CodeIgniter by managing your application / config / config.php file and setting it up
$ Config ['csrf_protection'] = true;

If you use Form Booster, the form_pen () function will automatically insert a secret CSRF field in your form


4) Why is there a required to configure the URL routes?
There are some benefits such as changing the URL routes
From SEO perspective, get URL SEO friendly and more user visits
For security reasons hide the URL elements from some function names, controller names etc from users
Provide different functionality to a specific part of the system

5) List out different types of hook point in Codeigniter?
different types of hook points in CodeIgniter:
Post_controller_constructor
Pre_controller
Post_sytem
Pre_system
Cache_override
Display_override
Post_controller

6) What is the security parameter for XSS in CodeIgniter?
CodeIgniter has a cross-site scripting hack prevention filter. To filter all POST and COOKIE data across, this filter can run automatically or you can run it on the basis of the item. The XSS filter will look at the common methods used to trigger JavaScript or another type of code, which tries to hijack cookies or other malicious activity. If it is detected to detect any suspicious thing or something unknown, it will convert data character organization.

7) How do you explain the image / CSS / javascript link from a scene at code igniter?
There is no Codeigniter path in HTML, as it is a PHP server side framework. To link images / CSS / JavaScript to a view in CodeIgniter, just use an absolute path to your resources
/css/styles.css
/js/query.php
/img/news/566.gpg


8) What are hooks in CodeIgniter?
CodeIgniter's hook feature provides a way to modify the inner work of the structure without the original file hack. In other words, Hooks allows you to execute a script with a specific path in coding. Usually, it is defined in the application / config / hooks.php file.

9) How you will load or add a model in CodeIgniter?
In your controller functions, models will usually load; you will use the function.
$this->load->model (‘Model_name’);

10) What helpers in CodeIgniter are and how you can load a helper file?
In CodeIgniter, helpers are a functional group in a special section that helps you perform special functions. In CodeIgniter, you will find a lot of helpful helper like URL help - help to create links, text helpers - read various text formatting routines, cookie-assisted sets, and cookies. You can load the file using the command $ the-> load-> support ('name');

11) Explain routing in CodeIgniter?
In CodeIgniter, PHP files served instead of accessing it directly from different browsers. This process is called routing. The routing codesigner gives you the freedom to modify the default URL pattern as needed to use your own URL pattern.Therefore, whenever a request is made and it matches our URL pattern it automatically indicates the specific controller and function.


12) What is the barrier at CodeIgniter?


The inhibitor uses a local PHP function such as set_exception_handler, set_error_handler, register_shutdown_function to handle an error handler class, potter errors, exceptions and fatal errors.

13) What is the default URL pattern used in the Codeigniter framework?
The default URL pattern of the Codeigniter Framework URL contains four main elements. First, we have the name of the server and later the Controller's class name has the Controller function name and the function parameter. Codeigniter can be accessed using the URL booster. For example HTTP: // servername / controllerName / controller function / parameter1 / parameter2.

14) Explain that you can extend the class in Codeigniter?
To expand CodeIgniter's local input class, you will need to create a file named Application / Core / MY_Input.php and publish your class
Class MY_Input CI_Input Expand {

}


2 comments:

  1. HTML Pro Team has got an extensive expertise in PSD To Joomla Theme Conversion with the ability to work on Joomla plug-in development and customization, Shopping Cart Plug-ins, Commercial Plug-in Implementations, Display and Screen Compatibility and Schema with Load Page Speed Optimization and all you can think a Joomla based site can do. If you’re looking to build a Joomla website in a hurry/jiffy and effortlessly – our experts will slice your PSD into HTML then code a Joomla theme for your next project with a guaranteed satisfaction!

    ReplyDelete
  2. The word "tattoo" has been in the top ten searched terms since Lycos started tracking search engines.
    kit tattoo

    ReplyDelete