CodeIgniter

How to rename file uploaded in CodeIgniter?

Rename file uploaded in Codeigniter
Rename file uploaded in Codeigniter

Hello, friends today we will learn how to rename or change the file name of uploaded files in CodeIgniter.
If you are going to add time as the prefix of the file name along with the original name when uploading, but you couldn’t figure it out. Then this tutorial will be very helpful for you.

Step 1. Create a view named image.php. in it copy and paste below code and save it to application/view/

Step 2. Create a controller called image.php. in it copy and paste below code and save it to application/controllers/

 

About the author

Dinesh Sharma

I have worked on many CMS & Frameworks of PHP & I love to share my knowledge of what I am learning every day.

Add Comment

Click here to post a comment

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