note 30537 deleted from function.getimagesize by betz

From: Date: Fri, 21 Mar 2003 07:36:11 +0000
Subject: note 30537 deleted from function.getimagesize by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-45600@lists.php.net to get a copy of this message
I have a problem with getimagesize() the code is here end the problem is shortly commented <?php $path = "."; $dir_handle = @opendir($path) or die("Couldnt open path - \"$path\""); while ($file = readdir($dir_handle)){ if($file!='.' && $file!='..' && $file!='index.php' && $file!='css.css'){ /*problem is here, it appears that i dont get width nor height of a picture*/ $size = getimagesize($file); $real_w = $size[0]; $real_h = $size[1]; $one=ceil(intval($real_w / 167)); $two=ceil(intval($real_h / 125)); $new_w=$real_w / $one; $new_h=$real_h / $two; echo "".$file."(".$real_w." ".$real_h.")"; //echo "<img src=\"".$path."/".$file."\" width=\"".$new_w."\" height=\"".$new_h."\"></img> "; } else echo""; } closedir($dir_handle); ?>

« previous php.notes (#45600) next »