After the file is uploaded, why it always gives me the false even if it is image?
if (!getimagesize($_FILES['imagefile']['tmp_name'])) { $boolean = false; }
By the way, it gives me this error:
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in...
Make sure that your file is being uploaded before carrying any operation on it. Just dump the
$_FILESarray while development, like:You need to have a
enctypeattribute applied on your<form>tag, for uploading a file. See http://www.w3.org/TR/html401/interact/forms.html#h-17.3