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

$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);

?>
arrow
arrow
    全站熱搜

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