[Solved] Curious: $this->upload->display_errors(); - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: [Solved] Curious: $this->upload->display_errors(); (/showthread.php?tid=61252) |
[Solved] Curious: $this->upload->display_errors(); - vrsotto - 04-04-2015 Hi I'm able to do multiple uploads using the following codes (bellow). on $config (req. var in $this->process_file_upload($field_file_name, $config)), i set allowed file types to "jpg|gif|png". So, when i test and upload files like in "file.htm, file.txt and then file.jpg". basically, files with ".htm" and ".txt" will not be uploaded. arrays $data[0]['error'] and arrays $data[2]['error'] should each have value "The filetype you are attempting to upload is not allowed." but what is happining is that arrays $data[2]['error'] kind'a concatenate value from $data[0]['error'], is this normal? Please see my attached file showing my dump result. PHP Code: for ($count = 0; $count < $number_of_files; $count++) { Thanks, vrsotto RE: Curious: $this->upload->display_errors(); - gadelat - 04-04-2015 Yes. display_errors() outputs uploading errors for all of the files, doesn't matter if files were uploaded one by one. Remove this from loop (04-04-2015, 10:11 AM)vrsotto Wrote:and use that function after the loop RE: [Solved] Curious: $this->upload->display_errors(); - vrsotto - 04-04-2015 Ah, Yes. Got the point! Thanks! (04-04-2015, 11:44 AM)gadelat Wrote: Yes. display_errors() outputs uploading errors for all of the files, doesn't matter if files were uploaded one by one. Remove this from loop |