I am developing a module of epaper in codeigniter(PyroCMS).
I want to know how can I upload multiple images ar once.
Can anyone guide me in uploading multiple images?
I tried but I only found code for uploading single image which I have already used in news module.
In the view file give this code for image upload:
where
Now you need to create a folder in the root directory where your photos will be uploaded.
After that in the controller's method you need to store the path to that folder in a variable.This variable will be used to upload the images in the folder.
Next,get the names of all the images in a array something like this:
After that for every array element,i.e.,for every image run the below code to upload it:
Just copy the above code.It should work as it is made for a general case by me!You can copy that code in your model file and call it in the controller like this :
And then store every image in the database
where
Be careful.Take care and do every step accurately