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.







Sunday, August 31, 2014

DOs and DONTs



Hello Friends,

          As a SLIIT Third year Software Engineering Students, there are some DOs and DONTs what we have to concern from the beginning to the end of the Software Engineering Project. Will look at some of them. 

DO's

1.  Hard Working

          To get through this project you should always work hard. First we have to try harder by ourselves to solve any problem before search on the Internet or take help from the others. Once we try hard only we can understand the problem well and make a solution. Though you try hard still you are in a trouble then we can move into a friend or related web searches. If you get a help from someone or the web you much understand the coding or whatever the thing goes on that and should have the ability to explain it to another.


2.  Time Management

          When it comes to the time management there are few thing you need to pay attention.
  • Set an agenda.
     Set this ahead of time to ensure members can be prepared. It’s better if you can meet your supervisor or the Lecturer in charge and get to know about your presentation schedules. So you can work according to the schedule. It’s better if you can make sure the assignment dates for other subjects as well. Then you can work without messing up everything with this project.
  • Take notes.
    Ensure that one person take down the ideas so they aren’t lost. Before starting coding its better if you can have a rough sketch about what you are up to do. So whenever you need to review about your work you have a simple and complete plan with you.
  • Assign tasks and set deadlines.
     Go beyond simply agreeing that something needs to be done; assign tasks among the members and allocate timelines. Setting deadlines is a must with this project. Otherwise till the last hour you will suffer with the iteration workloads. Self-deadlines are really important when it comes to this project presentations and other subject’s presentations together.


3.   Communication

          Members of your project should always meet up and talk. Once you meet up conclude all the details and make a note in points what you have talked. Listen everyone in the group. Give enough time to talk everyone. Give your ideas without hiding anything. Your idea may be perfect than the others. Deal with problems as they arise. Try not to let concerns fester as these will often turn into bigger problems. It is important that all perspectives are put forward so that intellectual debate can flourish.  Be a genuine contributor to your group. Always give priority to the leader of the group. Listen before commenting. After all meet your supervisor and give the conclusion of your discussion. Take his or her suggestions as well. Do this frequently.




 

 DON'Ts

1.  Neglect the other Subjects

This is not the only thing you have to complete within the semester. All the other four subjects are equally important. So don’t take their time to do your project works. Make the same amount of effort for every subject. Getting an A for this and repeat all the other subjects are worthless.


 

2. Wait till last moment

          Waiting till the last moment doesn’t work for any thing. Same thing applies for this project as well. It’ll ruin even a single thing you perfectly know how to do is. The worst case of this, is you may not be able to cover the workload within the given time period.