<?php
$dirname = "."; # current directory
$dir = opendir($dirname);
while (false != ($file = readdir($dir)))
{
if (ereg(".html$", $file))
{
$tag = substr($file, 0, strlen($file)-5);
$file_list .= "<li><a href='/labels/$file'>$tag</a>";
}
}
closedir($dir);
?>
<h1>My Tags</h1>
<ul>
<?php echo($file_list); ?>
</ul>
Labels: Blogger