[PHP] Mime Types & .PNG images

Soldato
Joined
12 Jun 2005
Posts
5,361
Hi there,

I am having a little trouble with getting the mime type (or any details) of the image type .PNG.

Whenever I upload the image and run this script:

PHP:
<?php

     $file_details = @getimagesize($_FILES['image']['tmp_name']);
     print $file_details;

?>

I get this:



You can see it in action here: Click Here

The image I am trying to upload is simply a colour to test:



Thanks in advance!


- Conrad11
 
Last edited:
The reason I use the error supprision, is that fact that its used in file validation, I use the function to get details of the image. And if by chance the user uploads a txt file, does the getimagesize function not produce an error?
 
Back
Top Bottom