blockcipher
05-05-2005, 07:19 PM
Hello everyone :)
I'm not a programmer but grabbed some php code of the net that will list out files in a folder. Below is a sample of that code:
<?php
// open this directory
$myDirectory = opendir(".");
// get each entry
while($entryName = readdir($myDirectory))
{
$dirArray[] = $entryName;
}
// close directory
closedir($myDirectory);
// count elements in array
$indexCount = count($dirArray);
sort($dirArray);
print("<TABLE border=0 cellpadding=0 cellspacing=0 \n");
for($index=0; $index< $indexCount; $index++)
{
print("<tr><td><a href=\"$dirArray[$index]\">$dirArray[$index]</a></td></a></td> ");
print("<td>");
print("<td>");
print("</td>");
print("</TR>\n");
}
print("</TABLE>\n")
?>
Now its listing the files great, but now I want to somehow echo out the date of the file.
Any programmer out there willing to give me the code? ;) I searched awhile on google, but I'm probably putting in the wrong info :)
I appreciate it!
I'm not a programmer but grabbed some php code of the net that will list out files in a folder. Below is a sample of that code:
<?php
// open this directory
$myDirectory = opendir(".");
// get each entry
while($entryName = readdir($myDirectory))
{
$dirArray[] = $entryName;
}
// close directory
closedir($myDirectory);
// count elements in array
$indexCount = count($dirArray);
sort($dirArray);
print("<TABLE border=0 cellpadding=0 cellspacing=0 \n");
for($index=0; $index< $indexCount; $index++)
{
print("<tr><td><a href=\"$dirArray[$index]\">$dirArray[$index]</a></td></a></td> ");
print("<td>");
print("<td>");
print("</td>");
print("</TR>\n");
}
print("</TABLE>\n")
?>
Now its listing the files great, but now I want to somehow echo out the date of the file.
Any programmer out there willing to give me the code? ;) I searched awhile on google, but I'm probably putting in the wrong info :)
I appreciate it!
