nikefido Posted February 25, 2008 Share Posted February 25, 2008 I have a script which uploads "any" file type successfully (it doesn't differentiate between file extensions) - but I cannot seem to upload files that are images? I have tested .jpg and .png files, both of which don't work. However, .txt, .doc files (etc) will work. Is this a setting in php.ini? Do I need to use the GD library for some reason? Thanks Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 25, 2008 Share Posted February 25, 2008 There are no settings in php or web servers that limit the type of file that can be uploaded. This is likely a file size problem. Does your code have any logic that is checking the ['error'] element of the $_FILES array to tell you why the upload failed? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted February 25, 2008 Share Posted February 25, 2008 try <?php print_r($_FILES); ?> and if you notice that errors aren't equal to 0 then see what those errors mean and you should have a clearer idea Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.