Category: CodeIgniter

  • MVC Framework

    CodeIgniter is based on the Model-View-Controller (MVC) development pattern. MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain minimal scripting since the presentation is separate from the PHP scripting.

  • Application Architecture

    The architecture of CodeIgniter application is shown below. Directory Structure The image given below shows the directory structure of the CodeIgniter. CodeIgniter directory structure is divided into 3 folders − Application As the name indicates the Application folder contains all the code of your application that you are building. This is the folder where you…

  • Installing

    It is very easy to install CodeIgniter. Just follow the steps given below − On visiting the URL, you will see the following screen −

  • Overview

    CodeIgniter is an application development framework, which can be used to develop websites, using PHP. It is an Open Source framework. It has a very rich set of functionality, which will increase the speed of website development work. If you know PHP well, then CodeIgniter will make your task easier. It has a very rich…

  • Security

    XSS Prevention XSS means cross-site scripting. CodeIgniter comes with XSS filtering security. This filter will prevent any malicious JavaScript code or any other code that attempts to hijack cookie and do malicious activities. To filter data through the XSS filter, use the xss_clean() method as shown below. You should use this function only when you are submitting…

  • Internationalization

    The language class in CodeIgniter provides an easy way to support multiple languages for internationalization. To some extent, we can use different language files to display text in many different languages. We can put different language files in application/language directory. System language files can be found at system/language directory, but to add your own language…

  • Adding JS & CSS

    Adding JavaScript and CSS (Cascading Style Sheet) file in CodeIgniter is very simple. You have to create JS and CSS folder in root directory and copy all the .js files in JS folder and .css files in CSS folder as shown in the figure. For example, let us assume, you have created one JavaScript file sample.js and…

  • Benchmarking

    Setting Benchmark Points If you want to measure the time taken to execute a set of lines or memory usage, you can calculate it by using Benchmarking points in CodeIgniter. There is a separate “Benchmarking” class for this purpose in CodeIgniter. This class is loaded automatically; you do not have to load it. It can…

  • Application Profiling

    When building a web application, we are very much concerned about the performance of the website in terms of how much time the controller took to execute and how much memory is used. Not only the performance, but we also need to see the insights of data like POST data, data of database queries, session…

  • Page Redirection

    While building web application, we often need to redirect the user from one page to another page. CodeIgniter makes this job easy for us. The redirect() function is used for this purpose. Syntax redirect($uri = ”, $method = ‘auto’, $code = NULL) Parameters $uri (string) − URI string$method (string) − Redirect method (‘auto’, ‘location’ or ‘refresh’)$code (string) − HTTP Response…