This function able to loop through the folder you specify and display the content. Each file will be A tagged for quick access
PHP
function list_files($dir)
{
if(is_dir($dir))
{
if($handle = opendir($dir))
{
while(($file = readdir($handle)) !== false)
{
if($file != "." && $file != ".." && $file != "Thumbs.db")
{
echo '<a target="_blank" href="'.$dir.$file.'">'.$file.'</a><br>'."
";
}
}
closedir($handle);
}
}
}

Comments will be moderated and
rel="nofollow"will be added to all links. You can wrap your coding with[code][/code]to make use of built-in syntax highlighter.function list_files($dir) {
$files = array();
foreach(glob($dir) as $file) {
$name = end(explode(DIRECTORY_SEPARATOR, $file));
array_push($files, "<a href='$file'>$name</a>");
}
return $files;
}
: )