Posted by Fred Atkinson on 09/30/97 11:24
With a little coding, I arrived at a script that does what I
want it to do. Thanks for the lead.
I want to share that script with you. It is pasted below. Put
it in your as index.php in your directory and it comes up with all the
files in that directory with links to them and the filesizes.
Regards,
Fred
<?php
print" <CENTER>\n";
print" <TABLE bgcolor=FFFFFF cellPadding=2 border=0>\n";
print " <TR>\n";
foreach (glob("*.*") as $filename) {
if ($filename != "index.php") {
print " <TD><P ALIGN=left>\n";
print " <A HREF=\"$filename\">$filename</A>\n";
print " </TD>\n";
print " <TD><P ALIGN=right>\n";
print " " . $english_format_number =
number_format(filesize($filename)) . " bytes\n";
print " </TD>\n";
print " </TR>\n";
}
}
print " </TABLE>\n";
print " </CENTER>";
?>
Navigation:
[Reply to this message]
|