Codeigniter multiple file upload messes file extension

Faced the exact similar stuff 2 days ago but did it the old fashioned way hope it helps. try this .. function tester(){ $this->load->library(‘upload’); // NOTE: always load the library outside the loop $this->total_count_of_files = count($_FILES[‘filename’][‘name’]) /*Because here we are adding the “$_FILES[‘userfile’][‘name’]” which increases the count, and for next loop it raises an exception, … Read more

How to get only images using scandir in PHP?

You can use glob $images = glob(‘/tmp/*.{jpeg,gif,png}’, GLOB_BRACE); If you need this to be case-insensitive, you could use a DirectoryIterator in combination with a RegexIterator or pass the result of scandir to array_map and use a callback that filters any unwanted extensions. Whether you use strpos, fnmatch or pathinfo to get the extension is up … Read more

What is the difference between creating JSF pages with .jsp or .xhtml or .jsf extension

JSP is an old view technology and widely used in combination with JSF 1.x. Facelets (by some people overgeneralized as XHTML) is the successor of JSP and introduced as default view technology of JSF 2.x at end of 2009. When you were seeing JSPs, you were perhaps reading outdated books, tutorials or resources targeted on … Read more