questa e' la funzione...

function filesUpload_mc($HTTP_POST_FILES,$file_name,$file_d ir,$counter,$prefix)
{
$client_name = $HTTP_POST_FILES[$file_name]['name'];
$temp_name = $HTTP_POST_FILES[$file_name]['tmp_name'];

print $temp_name;

$info=getimagesize($temp_name);
if (isset($info))
{
if ($info[2]==1)
{
$img_ext="gif";
}
else if ($info[2]==2)
{
$img_ext="jpeg";
}
else
{
return 0;
}
}
else
{
return 0;
}
$width_or=$info[0];
$height_or=$info[1];



$width_def ="80";
$height_def="40";

if ($img_ext=="gif") $nuova_immagine=imagecreatefromgif($temp_name);
if ($img_ext=="jpeg") $nuova_immagine=imagecreatefromjpeg($temp_name);



$tmp =explode(".",$client_name);
$client_name_no_ext = strtolower(replaceSpecial($tmp[0]));
$client_ext = strtolower(replaceSpecial($tmp[1]));
$client_name = $client_name_no_ext.".".$client_ext;
$client_name = my_getFileName($file_dir,$client_name,$counter,$pr efix);

$file_exists = !isEmpty($client_name) && !isEmpty($temp_name);
if($file_exists)
{
$file_dir = $file_dir.$client_name;

if ($nuova_immagine) print("pippo");
print("
");
print $file_dir;


$iscopied = imagecopyresized($nuova_immagine, $file_dir, 0, 0, 0, 0, $width_def, $height_def, $width_or, height_or);
}
else
{
$iscopied = false;
}

$result[0] = $iscopied;
$result[1] = $client_name;

return ($result);
}


e mi da
Warning: Supplied argument is not a valid Image resource in
alla riga dell0imagecopyresized...dove sabglio?
a me embra tutto giusto...