$dirName = '/images/pretty/20100403';

$more = 1;

$dir = opendir('../' . $dirName);

$count = 0;

while ($file = readdir($dir)) {

if ($file != '.' && $file != '..' && in_array(getExtName($file), array('jpg', 'gif', 'png', 'bmp')) ){

$count++;

if($count <= $more) continue;

echo sprintf('
', $_SERVER['HTTP_HOST'], $dirName, $file);

}

}

closedir($dir);

?>

orzxdorz 發表在 痞客邦 PIXNET 留言(0) 人氣()