also try the new
$_FILES['image']['error']
this will return an numeric upon upload error which *should* help indicate exactly what went wrong.
I wrote this multiple ternery for a dual image upload which you could easily adapt
PHP Code:
if($_FILES['image']['error'] == 0)
{
// successful upload of something - do more tests - add rest of upload code
}
else
{
$err_code = $_FILES['upload_image']['error'];
$output_string .= ($err_code < 5) ? ($err_code < 4) ? ($err_code < 3) ? ($err_code < 2) ?
'Main Image File was above ' .ini_get('upload_max_filesize'). ' bytes in size.<br />' :
'Main Image File was above ' .$max_upload_size. ' bytes in size.<br />' :
'Main Image File was only partially uploaded, please try again.<br />' :
'No Main Image File was Uploaded, please try again.<br />' :
'Unknown Error Encountered, please try uploading again.<br />' ;
}
echo $output_string;
the $max_upload_size variable is the same as the MAX_SIZE form field entry that limits the post on the client side.
Bookmarks