Friday, December 23, 2016

Managing Application Versions

Would it not be nice if we make our application versions, this way we can create new versions of our application while supporting backward compatibility.
By doing this, we would be able to handle multiple versions of our application in a single CodeIgniter installation using the same index file.

Create new and Extend native CodeIgniter library

Library is a class that is normally located in the libraries directory. There are several CodeIgniter libraries which you could extend if you simply need to add some functionality. CodeIgniter also permits you to replace native libraries just by placing identically named versions in your "application/libraries" directory.
In summary:
  • You can create new libraries.
  • You can extend native libraries.
  • You can replace native libraries with your own.
Note:
You can extend or replace all libraries except Database classes

Monday, December 19, 2016

CodeIgniter Image Watermark

CodeIgniter Image Manipulation class lets us resize image, create thumbnail, crop, rotate and watermark images.
This tutorial shows a simple way to upload and watermark an image. Watermarking is only available using the GD/GD2 library.In addition, even though other libraries are supported, GD is required in order for the script to calculate the image properties. The image processing, however, will be performed with the library you specify.

Thursday, December 1, 2016

How to Upload File in CodeIgniter

File upload is one of the most common requiremets for most web applications. We could either implement this with native PHP or just use the CodeIgniter's way. Well, of course, we'll be going the CodeIgniter's way. CodeIgniter framework provides a descent and efficient way of doing such a thing. CodeIgniter's File Upload library is easy and simple. In this tutorial, we'll be creating a basic file upload feature, which you could then extend for your project.

Wednesday, November 30, 2016

Send Email With PHPMailer and CodeIgniter

CodeIgniter email class is built for handling double-byte characters which may not be the best shot for you, it sometimes break up characters, probably, due to improper UTF-8 encoding.

Instead of using CodIgniter Email class, we could instead integrate PHPMailer which you could download from here. In this way we could specify how our body is to be decoded.

How to Import CSV into MySQL Database with CodeIgniter

You may have some situations when you were asked to input some data directly to the database or with the User Interface. Well, that would have been just fine if you weren't asked to input over a hundred rows of data.
In this tutorial we're going to see how to import data from a Comma Delimited Values (csv) formated file to MySQL Database using CodeIgniter. Basically, we will be populating our database table with an excel file. In this tutorial, we will be importing list of students into our database tbl_users table.
At the end of this tutorial you'll have a User Interface like the following.

Monday, November 28, 2016

CodeIgniter Email Tutorial

Sending email in codeIgniter is much easier than you would imagine. At the end of this tutorial you would be able to send email through form.
Form

Before we start coding, we need to change some settings in our gmail account. We need to allow less secure apps to access our gmail account. To do that click here, make sure to turn it on.
Less