Category Archives: Codeigniter

How to save error logs in file in Codeigniter 3

Hello World, Welcome to ProjectsPlaza.com. Today I am going to discuss how to save error logs in the file in Codeigniter 3. Sometimes we need to save the errors in our development process. We can do this with a very easy step.

  • Open application/config.php
/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
|   0 = Disables logging, Error logging TURNED OFF
|   1 = Error Messages (including PHP errors)
|   2 = Debug Messages
|   3 = Informational Messages
|   4 = All Messages
|
| You can also pass an array with threshold levels to show individual error types
|
|   array(2) = Debug Messages, without Error Messages
|
| For a live site, you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 1;

You can change the above threshold according to the requirements. They have defined all options.


It will save the error in the application/logs directory.

Make sure your logs directory has writable permission

create-custom-library-in-codeigniter-3

Create a custom library in codeigniter 3

Hello World, Today i am going to create a custom library in codeigniter 3. Library refers to a class which is location in application/libraries folder. This folder contains only user defined libraries. Codeigniter have their own library which is located in system/libraries.

We should not modify the core library of any framework or any CMS becuase when you will update your system, your changes will disappear. Codeigniter provides facility to extend the core library classes and add some additional feature in it. In codeigniter, we can perform following things with library.

  • Create library from scratch
  • Extend the functionality of existing library
  • Replace the functionality of existing library

Continue reading

upload-image-with-codeigniter

Upload image with codeigniter

Hello World, This is ninth tutorial of the series Learn codeigniter from scratch. In the previous tutorial of this series, we have learned that how to perform update delete data in database with codeigniter. In this tutorial, we will learn how to upload image with codeigniter and save in database. From starting, we are performing all our code on todo list application. So this tutorial will also apply the code in todo list app.

Continue reading

searching-and-sorting-with-codeigniter

Searching and sorting with codeigniter

Hello World, Welcome to codeigniter tutorial series Learn codeigniter from scratch. In the previous tutorial you have learned that how to update and delete data from database with codeigniter. In this tutorial, we will learn that how we can perform searching and sorting with codeigniter. We will apply searching and sorting on out existing todo app. I have divided this tutorial in following parts:

  • Concept Overview
  • Implement Searching
  • Implement Sorting
  • Test the application.

Continue reading

update-delete-data-from-database-with-codeigniter

Update delete data from database with codeigniter

Hello World, Welcome to the tutorial series Learn codeigniter from scratch. This is eight tutorial of this series. In this tutorial, we will learn how we can update delete data from database with codeigniter. We will implement update or delete action on our existing todo application. In the previous tutorial we have learned that how we can implement jquery ajax with codeigniter.

Continue reading

implement-jquery-ajax-with-codeigniter

Implement jquery ajax with codeigniter

Hello World, This is seventh tutorial of the series Learn Codeigniter From ScratchIn this turoail we will learn how to implement jquery ajax with codeigniter. We will apply jquery ajax on our existing todo application. I hope you are enjoying this tutorial. In the previous tutorial, we have learned that how we can implement pagination with codeigniter. In the previous tutorial we have used the codeigniter pagination library. I have divided this tutorial in following parts:

Continue reading

implement-pagination-with-codeigniter

Implement pagination with codeigniter

Hello World, This is another tutorial of the series Learn Codeigniter from Scratch. In this tutorial, we will make our Todo Application fully dynamic and Implement pagination with codeigniter. In the last tutorial of this series, we have learned that how we can submit form and save data in database with codeigniter mysql. I have divided this tutorial in following parts:

Continue reading

Submit form and save data in database with codeigniter mysql

Submit form and save data in database with codeigniter mysql

Hello World, Welcome to the codeigniter tutorial series “Learn Codeigniter from Scratch”. In this tutorial we learn that how we can submit form and save data in database with codeigniter mysql. I have extended the previous tutorial so please update with previous tutorials.

In the last tutorial we have learned that how we can connect  and fetch data from database with codeigniter. We have inserted the data manually in the last tutorial but in this tutorial we will insert data in database with form. We are working on Todo list. In this tutorial we will add Todo list via form with codeigniter.

Continue reading

Connect-and-fetch-data-from-database-with-codeigniter

Connect and fetch data from database with codeigniter

Hello World, Welcome to codeigniter tutorial series Learn codeigniter from scratchIn this tutorial we will learn that how we can connect and fetch data from database with codeigniter. We will use Model Section in MVC in this step.

In the previous tutorials, we have learn that how to setup codeigniter and how to create static web application with codeigniter and bootstrap 3.

I have divided this tutorial in following parts:

Continue reading

Create static application with codeigniter and bootstrap 3

Hello World, This is second tutorial of codeigniter tutorial series “Learn Codeigniter from scratch” series.In this previous tutorial we have learnt that how we can setup codeigniter on local machine. In this tutorial we will create static application with codeigniter and bootstrap 3. I have divided this  tutorial in following parts:

  • Bootstrap Introduction
  • Create static application (with controller and view)

Continue reading