Wednesday, September 10, 2014

File uploading and Downloading using CodeIgniter

Upload and Download a File using CodeIgniter

Hello Friends,
          Today I'll tell you all how to implement File uploading and File downloading using CodeIgniter.

First will look into the File uploading section. 

File Uploading

First of all we have to create a folder call Uploads inside application folder.


Your upload file controller should have to be as follows.

  
Next create the interface inside application/view folder as mentioned below.


 Once you run the file here the output you get.



File Downloading


Once you upload the file here the way to download it.

First create the Download file Controller.




Then the download view File as follows.



Here the view you get when run the application.

For download method you can add parameter if you need according to your needs. I here implemented the very basic steps of downloading and uploading files.
 

 

Monday, September 8, 2014

Introduction to CodeIgniter Framework

 Hello Friends,

            Today I'll give you all a brief  introduction about the CodeIgniter Frame work and its features.

What is CodeIgniter?

          CodeIgniter is an Application Development Framework - a toolkit - for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task.

Server Requirements 

  • PHPversion 5.1.6 or newer. 
  • A Database is required for most web application programming. Current supported databases are MySQL (4.1+), MySQLi, MS SQL, Postgres, Oracle, SQLite,and ODBC. 

  Installation Instructions


 CodeIgniter can be installed in four steps:

  • Unzip the package.

  • Upload the CodeIgniter folders and files to your server. Normally the index.php file will be at your root.

  • Open the application/config/config.phpfile with a text editor and set your base URL. If you intend to use encryption or sessions, set your encryption key.

  • If you intend to use a database, open the application/config/database.phpfile with a text editor and set your database settings.



CodeIgniter Features

  • Model-View-Controller Based System
  • Extremely Light Weight
  • Active Record Database Support
  • Form and Data Validation
  • Session Management
  • Email Sending Class. Supports Attachments, HTML/Text email, multiple protocols (sendmail,SMTP, and Mail) and more.
  • Image Manipulation Library (cropping, resizing, rotating, etc.). Supports GD, ImageMagick, and Large amount of library and helper functions


Why We selected CodeIgniter for our Project?

          Our project was a web based application. So we were supposed to select PHP as the developing language. Because of that we went to the CodeIgniter. Those the main reasons why we have selected.
  •  CodeIgniter is Free
          No payments needed. We can simply download it from the site and use it.
  • CodeIgniter is Light Weight
          Truly light weight. The core system requires only a few very small libraries. This is in stark contrast to many frameworks that require significantly more resources. Additional libraries are loaded dynamically upon request, based on our needs for a given process, so the base system is very lean and quite fast.
  • CodeIgniter is fast
          Really fast due to the dynamic loading of the helper classes and libraries.
  • CodeIgniter Uses M-V-C
          CodeIgniter uses the Model-View-Controller approach, which allows great separation between logic and presentation.
  • CodeIgniter Generates Clean URLs
          The URLs generated by CodeIgniter are clean and search-engine friendly. Rather than using the Standard "query string" approach to URLs that is synonymous with dynamic systems, CodeIgniter uses a segment-based approach:
http://localhost/itt/index.php/LoginController


From the CodeIgniter site you will be able to find more information about the Framework.