Skip to content

Instantly share code, notes, and snippets.

@dphiffer
Created December 18, 2009 18:04
Show Gist options
  • Save dphiffer/259647 to your computer and use it in GitHub Desktop.
Save dphiffer/259647 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo basename(dirname(__FILE__)) ?></title>
</head>
<body>
<?php
$dh = opendir(dirname(__FILE__));
while ($file = readdir($dh)) {
if (preg_match('/.jpe?g$/i', $file)) {
echo <<<END
<img src="$file" alt="$file" />
END;
}
}
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment