Using the GD Library to Sketch
first get a list of all the images in the folder
function thumb()
{
$img_dir_path='images/';
$thumb_dir_path='images/thumbs/';
$img_array=GLOB($img_dit_path.'*.{jpg,jpeg}',GLOB_BRACE);
foreach($img_array as $img)
{
list($path,$file)=explode('/', $img);
list($fileName, $extension)=explode('.',$file);
$thumb-file=$thumb_di_path . $fileName. '-thumb.jpg';
if(file_exists($thumb-file))
{
}
else
{
}
}
}
source
share