Hi ... I am new at this and have been wracking my brain :unsure: with trying to figure out this error:
I am getting this "read error". I have tried to everything to figure it out. Any help would be greatly appreciated. Here is the error:
[CODE>Warning: getimagesize(): Read error! in /home/adminfd/public_html/Gallery/body.php on line 27
Warning: getimagesize(): Read error! in /home/adminfd/public_html/Gallery/body.php on line 27
[/code]
When I look at the script, here is what I have (this is just a portion of the script):
PHP Code:
--------------------------------------------------------------------------------
$rep_cat = opendir($file);
while (false !== ($file_cat = readdir($rep_cat))) {
if($file_cat != '..' && $file_cat !='.' && $file_cat !=''){
if(is_dir($file."/".$file_cat)){
$rep_anime = opendir($file."/".$file_cat); //I charge images of a folder
while (false !== ($file_anime = readdir($rep_anime))) {
if($file_anime != '..' && $file_anime !='.' && $file_anime !=''){
if(is_file($file."/".$file_cat."/".$file_anime) && getimagesize($file."/".$file_cat."/".$file_anime)){
$images++;
}
}
}
closedir($rep_anime);
$totcat++; //number of categories
}
}
}
closedir($rep_cat);
if($images != 0){ //if the folder has images
echo "<td width=\"50%\"><font size=\"3\" face=\"Verdana\"><img src=\"cartella.jpg\" align=absmiddle> [b]<a href=\"index.php?cat=$file\">$file</a>[/b] <font size=1>($images)</font></font></td>";
}
else{
echo "<td width=\"50%\"><font size=\"3\" face=\"Verdana\"><img src=\"cartella.jpg\" align=absmiddle> [b]$file[/b] <font size=1>($images)</font></font></td>";
}
$totimages = $totimages+$images;
$images=0;
$i++;
//every 2 folders comes created a new line
if($i==2){
$i=0;
echo "</tr><tr>";
}
}
}
}
?>
--------------------------------------------------------------------------------
I know it is probably right in front of my eyes :blink: ... but, any help at this point would be greatly appreciated.
Sandy
