Scusate la mia ignoranza,è da poco che programmo in php(o che ci provo... ),ma ho provato ad usare uno script scaricato da internet ed inserirlo nel mio sito.Ma quando ho provato ad usarlo seguendo le istruzioni indicate mi compare questo genere di errore:

Notice: Undefined offset: 1 in c:\programmi\easyphp1-8\www\thumbs.php on line 20

qualcuno sa dirmi cosa vuol dire e come si risolve il problema???
Grazie!

lo script di riferimento è questo:
if($file != "." && $file != "..")
{
$ext=explode(".",$file); #prende l'estensione

$ext=strtolower($ext[1]); #la converte in minuscolo

if(in_array($ext,$type))
{
if($i==0) echo"<tr>";

echo "<td>";

thumb("$dir/","$file",$w,$h,$r);

echo"</td>";
$i++;

if($i==$ncol)
{
echo"</tr>";
$i=0;
}

}
}
}
}

function thumb($dir,$img, $wt, $ht, $resize)
{
$file=$dir.$img;
$th_file=$dir."thumbs/th_".$img;

list($wi, $hi, $type, $attr) = @getimagesize($file);
list($th_w, $th_h) = @getimagesize($th_file);

if(!is_dir($dir."thumbs/")) mkdir($dir."thumbs/");

if(file_exists($th_file) && ($wt==$th_w || $ht==$th_h))
{
echo"<a href=\"#\" onClick=\"window.open('visual.php?file=$file&r=100 &t=$type','','height=$hi,width=$wi');\"><img src=$th_file border=0></a>";
if($resize)
{
echo"
<a href=\"#\" onClick=\"window.open('visual.php?file=$file&r=75& t=$type','','height=".(($hi+30)*0.75).",width=".(( $wi+30)*0.75)."');\">75%</a> ";
echo" <a href=\"#\" onClick=\"window.open('visual.php?file=$file&r=50& t=$type','','height=".(($hi+30)*0.50).",width=".(( $wi+30)*0.50)."');\">50%</a> ";
}
}
else
{
switch($type)
{
case 1: $im = @imagecreatefromgif($file); $ext="@imagegif(\$new, \$th_file);"; break;
case 2: $im = @imagecreatefromjpeg($file); $ext="@imagejpeg(\$new, \$th_file , 100);"; break;
case 3: $im = @imagecreatefrompng($file); $ext="@imagepng(\$new, \$th_file);"; break;
}

if( $wi > $wt ) $ht = ($wt / $wi) * $hi;

if( $hi > $ht ) $wt = ($ht / $hi) * $wi;

if( $type != 1 )
{
$new = imagecreatetruecolor($wt, $ht);
imagecopyresampled($new , $im , 0 , 0 , 0 , 0 , $wt , $ht , $wi , $hi);
}
else
{
$new = imagecreate($wt , $ht);
imagecopyresized($new , $im , 0 , 0 , 0 , 0, $wt , $ht , $wi , $hi);
}

eval($ext);

echo"<a href=\"#\" onClick=\"window.open('visual.php?file=$file&r=100 &t=$type','','height=$hi,width=$wi');\"><img src=$th_file border=0></a>";
if($resize)
{
echo"
<a href=\"#\" onClick=\"window.open('visual.php?file=$file&r=75& t=$type','','height=".(($hi+30)*0.75).",width=".(( $wi+30)*0.75)."');\">75%</a> ";
echo" <a href=\"#\" onClick=\"window.open('visual.php?file=$file&r=50& t=$type','','height=".(($hi+30)*0.50).",width=".(( $wi+30)*0.50)."');\">50%</a> ";
}

@imagedestroy($im);
@imagedestroy($new);
}
}