Jump to content

[SOLVED] failing to upload jpeg images


vikela

Recommended Posts

using a code to upload images some jpeg files are failing to upload!i can load jpg,bmp,and gif.what could be the problem?here is a piece of the code.

 

function is_valid_type($file)
{
        // This is an array that holds all the valid image MIME types
        $valid_types = array("image/jpg", "image/jpeg", "image/bmp", "image/gif");

        if (in_array($file['type'], $valid_types))
                return 1;
        return 0;
}

Link to comment
https://forums.phpfreaks.com/topic/151046-solved-failing-to-upload-jpeg-images/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.