Is there a way I can just put this in a directory and have it list the files for that dir, and not have to manually specify the dir to list the files of?PHP Code:<?
$dir_name = "C:\site";
$dir = opendir($dir_name);
$file_list = "<ul>";
while ($file_name = readdir($dir))
{
if (($file_name != ".") && ($file_name != ".."))
{
$file_list .= "<li>$file_name</li>";
}
}
$file_list .= "</ul>";
closedir($dir);
?>
<html>
<head>
<title>Files in <? echo "$dir_name"; ?></title>
Files in: <? echo "$dir_name"; ?>
<? echo "$file_list"; ?>
</body>
</html>
