Revision: 40361
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 31, 2011 17:57 by ericmuyser
Initial Code
<div id="cycle"> <? $path = realpath(dirname(__FILE__) ."/../../../resources/images/headers"); $files = array(); if ($h1 = opendir($path)) { while (($f1 = readdir($h1)) !== false) { if ($f1 == '.' || $f1 == '..') continue; if (!is_file ($path . '/' . $f1) && !preg_match ("#\.(jpeg|jpg|gif|png|bmp)$#i", $f1)) continue; $files[] = $f1; } } sort($files); foreach($files as $file): $new_path = realpath($path . "/../../../uploaded/thumbnails"); $new_file = "800x336" . $file; $image = Phpr_Image::makeThumbnail($path . '/' . $file, $new_path .'/' . $new_file, 800, 336);?> <img src="<?= root_url('/uploaded/thumbnails/' . $new_file) ?>"width="800" height="336" /> <? endforeach ?> </div>
Initial URL
Initial Description
Initial Title
ls output directory images
Initial Tags
Initial Language
PHP