Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

What is codeigniter.

codeigniter is a MVC based Framework, which is used to develop website or web applications by using
built in features.
It is an open Source framework.
it has a very rich set of functionality, which will increase the speed of website development work.

What is Frameeork?
A framework is a structure that you can build software on.it serves foundation, so you're not starting
entierly from scratch. Frameworks are tipically associated with a specific programming language and
are suited to diffrent types of tasks.

what are the Codigniter fetures.


MVC system, light weight, SEO frendly url, form & data validations, scurity and xss filtering, session
management,
pagination, query builder database support, email sending, image manipulation laibrary, support
hooks, library & helper.

What is MVC pattern ?


MVC is an architectiral pattern that seprates an application into theree main logical components: the
model view &contoller.

Use of autoload file ?


autoload file is use to load libraries, model, helper file. if we are load in autoload file any helper then
we do not need to load in all controls. We simply load in autoload file.

what is URL structur in codeigniter ?


baseurl/index.php/controllername/functionname.
we can also modify using routes also.

how to remove index.php from the url.


Using .htaccess file we can remove index.php from the url.

what is use of routes file.


use for SEO frendly urls, hidding our controller and fucntion & aslo increase our security.

What is hooks ?
hooks are the system events. if we to manage before and after starting application then we will use
hooks for this.
Hokks is use for authantication, hooks like a middleware it checks a code before code execute.
first we have to enable hooks from the config file $config['enable_hooks;]=true;
there are 7 Hook points.
pre_system---veru urly system execution, pre_controller, post_controller_constructor---after
constructer , post_controller , display_override , cache_override , post_system
hooks folder application->hooks->abc.php file.

What are the helpers in codeigniter?


helper is a file there is number of fucntion to perform perticular task. like in codeigniter URL, form,
text, cookie etc predefine helpers.

What is diffrance between helper and library?


helper is a file with a set of fucntion in a particular category and is not written in object oriented
formate.
library is a class with a set of fucntions that allows creating instance of that class and is written in
object oriented formate.
What is an inhibitor in CodeIgniter?
An inhibitor in CodeIgniter is an error handler class. set_error_handler, set_exception_handler,
register_shutdown_function.

what is CodeIgniter Architecture?


index.php=>routing=>security=>application
controles=>model,library,helper,plugins,script,=>view,=>caching->index.php

What is CSRF token in CodeIgniter? How to set CSRF token?


There are many ways to protect CodeIgniter from CSRF(Cross Site Request Forgery), one method of
doing this is to use a hidden field in every form on the website. This hidden field is considered as CSRF
token, it is a random value that changes with each HTTP request sent. After gets inserted into the
website forms, it will be saved in the user’s session as well. So, when the user submits the form, the
website checks whether it is the same as the one that was saved in the session. If it is the same then,
the request is authorized.

What is the security parameter for XSS in CodeIgniter?


Codeigniter has got a Cross-Site Scripting(XSS) hack prevention filter. This filter either automatically
runs or you can run it based on item, to filter all data related to POST and COOKIE.
The XSS filter will target the frequently used methods to trigger JavaScript code or other types of code
that attempt to hijack cookies or do any other malicious activity. If it identifies anything suspicious or
anything disallowed is encountered, then it will convert the data to character entities.
To filter data through the XSS filter, we will make use of the xss_clean() method as given below:

Explain CodeIgniter folder structure.


The CodeIgniter folder structure is given below:

application: This directory will have your application logic. All of your application codes will be held in
this directory. Internal subdirectories in the CodeIgniter directory structure are given below:
cache – It stores cached files.
config – It keeps configuration files.
controller – All application controllers are defined under this controller.
core – It consists of custom core classes that extend system files. For example, if you create a base
controller that other controllers should extend, then you should place it under this directory.
helpers – This directory will be used for user-defined helper functions.
hooks – It is used for custom hooks in the CodeIgniter folder structure.
language – It is used to store language files for applications that use multiple languages.
libraries – It is used to store custom-created libraries.
logs – Application log files are placed in this directory.
models - All application models must be defined under this directory.
third_party – This is used for custom many packages that are created by you or other developers.
views – application views will be stored in this directory.
system: It consists of the framework core files. It is not advised to make any modifications in this
directory or put your own application code into this directory. System subdirectories in CodeIgniter
are given below:
core – This is considered to be the heart of the CodeIgniter Framework. All of the core files that
construct the framework are located here. If you would like to extend the core file functionality, then
you must
create a custom core file in the application directory. After this, you are allowed to override or add
new behavior that you wish. You should never make any changes directly in this directory.
database – It stores the files such as database drivers, cache, and other files that are needed for
database operations.
fonts – This directory contains fonts and font-related information.
helpers – This directory consists of helper functions that come out of the box.
language – It contains language files that are used by the framework
libraries – It contains the source files for the different libraries that come along with CodeIgniter out
of the box.
user_guide: This directory consists of a user manual for CodeIgniter. You should not upload this
directory during application deployment.
vendor: This directory consists of composer packages source code. The composer.json and
composer.lock are the other two files related to this directory.
index.php: This is considered as the entry point into the application. It is placed inside the root
directory.

You might also like