Image upload with Codeigniter

1) Create upload.php file inside controller, copy and past the following code into. Also create an ‘uploads’ folder inside the codeigniter root folder.

2) Create the upload_view and upload_success files inside view folder and insert the below codes into

Upload Success

If you have any question regarding the codes above, you can ask as a comment. I will be here to answer your questions

53 thoughts on “Image upload with Codeigniter

  1. I believe you need to upload the file_path to the database field and then retrieve via the usual method. You do not upload images to databases in general.

  2. if upload folder path giving error
    then write —- $this->upload->initialize($config);
    before this—- $this->load->library(‘upload’,$config);

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.