thumb_generator.php

来自「easy cms for getion you image with high 」· PHP 代码 · 共 30 行

PHP
30 行
字号
<?phprequire('includes/functions.php');require('includes/thumbnailer.php');	$current_dir = get_param('dir');	$opendir = 'gallery/'.$current_dir;    if ($handle = opendir($opendir)) {        while (false !== ($file = readdir($handle))) {            if ($file != '.' AND $file != '..' AND (substr(strtolower($file),-3) == 'jpg' || substr(strtolower($file),-3) == 'gif' || substr(strtolower($file),-3) == 'png')) {				if(!file_exists('data/thumbdata_'.base64_encode($current_dir.']|['.$file.']|['.filectime('gallery/'.$current_dir.'/'.$file)).'.jpg') AND (substr(strtolower($file), -3) == 'jpg' || substr(strtolower($file), -3) == 'gif')){					$tis = new ThumbnailImage();					$tis->src_file  = $opendir.'/'.$file;					$tis->dest_type = THUMB_JPEG;					//$tis->dest_file = 'data/thumbdata_'.base64_encode($current_dir.']|['.$file . ']|[' . filemtime('gallery/'.$current_dir.'/'.$file)).'.jpg';					$tis->dest_file = 'data/thumbdata_'.base64_encode($current_dir.']|['.$file . ']|[' . filectime('gallery/'.$current_dir.'/'.$file)).'.jpg';					$tis->max_width = 120;					$tis->max_height = 4000;					$tis->Output();				}            }        }        closedir($handle);    }?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?