Your Location is: Home > Php

why some jpg images i select from mobile wont detect?

From: Honduras View: 4658 Lovelyn 

Question

could someone please check what is wrong with this code that some jpg images click from mobile are not getting detected as a jpg?

here is my code

if($_FILES["file"]["type"] !='' && !in_array($_FILES["file"]["type"], array("image/jpg", "image/jpeg", "image/pjpeg"))){
            $error[] = 'We accept only JPG / JPEG image format.';
        }

thanks

Best answer