Image Upload in CodeIgniter

by Bhumi // Mar 19,2013 // No comment

Image Uplod in CodeIgniter

CodeIgniter makes it easy to add images to your site. You can upload them using code I am going to explain here in this post.If you want to upload image in codeigniter,you need to write below html code into your view file which will create field to upload image.

Now in the form action, at the PHP side, your code should be this. Here txtImage is your input field name. You have to provide upload_path, allowed types, max_size etc. You can ecrypt the file name by passing encrypt_name = true. The else part creates image thumbnail for specified height and width.

That’s it, Your image is get uploaded to the folder.you can have a look into folder. :)

Thank you for reading, good luck and let me know if you run in to any problems & I’ll help as much as I can :)

Hope this post will helpful for you, waiting for your responses.Thanks for reading and feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

RELATED POST

Get IP address in CodeIgniter

CodeIgniter is great framework by its simplicity because structure of the CodeIgniter framework is clear and flexible. Let’s understand the function used to get user’s READ MORE

Pagination in CodeIgniter

Pagination is a number of rows to be fetched from the database and mostly found at the bottom of the page which allow you to READ MORE

Codeigniter _remap function

Today I am going to write a short post about the _remap() function in CodeIgniter which is used to remap the function with Controller. In READ MORE

Prepping Functions in CodeIgniter

We’ve looked basics about CodeIgniter at here which is about installation steps and basics about CodeIgniter. Today I am going to cover prepping functions used READ MORE

Getting Started with CodeIgniter

Today i am going to cover small tutorial about Codeigniter.CodeIgniter is a PHP framework for web application.Basically CodeIgniter follows the most well known Model, view READ MORE

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">