OwrLam 0 Report post Posted March 17, 2005 I make script of images galery: <?php$title="Galery";$head=$html="";$Find_Img_name=0;$Dir="./img/galery/";$OpenDir=opendir($Dir);while(($File=readdir($OpenDir))!==false){if($File!="." && $File!=".."){if(md5($File)==$_GET['id']){$Find_Img_name=$File;break;}}}$Img="data/images.dat";$ImgFile=file($Img);$Yes_Print=0;for($i=0;$i<count($ImgFile);$i++){$ImgSPL=split("::",trim($ImgFile[$i]));$Img_src=$ImgSPL[0];$Img_name=$ImgSPL[1];if($Img_src==$Find_Img_name){$Yes_Print=1;break;}}if($Find_Img_name && $Yes_Print){$Image_size=filesize("$Dir$Find_Img_name");$html.=<<<HTML<table align=center border=0 style="border:1px Solid #8994B1"><tr><td align=center><img src="$Dir$Find_Img_name" alt="$Find_Img_name ($Image_size bytes)" border=0><br></td></tr><tr><td align=center><b>$Img_name</b></td></tr></table>HTML;}else{echo "<font color=Red><b>Error!";exit;}include "inc/_small.php";?> But he doesnt work! Error is - can`t get image size! Share this post Link to post Share on other sites
mobious 0 Report post Posted March 18, 2005 make sure that you are comparing the id to the md5 checksum of the image. or try changing... $Image_size=filesize("$Dir$Find_Img_name"); to...$Image_size=filesize($Dir . $Find_Img_name); Share this post Link to post Share on other sites
zeek 0 Report post Posted March 18, 2005 your script is cool ...i like it Share this post Link to post Share on other sites
OwrLam 0 Report post Posted March 18, 2005 Ok. I found error. In CHMOD.. Ok Share this post Link to post Share on other sites