really?
funky chickens dude, thats actually pretty simple 🙂
I am working now, so i will give you the functions you need to use.
first of this will make it easier, are all your picture files in the same directory?
i hope they are or this wont be as easy.
<?php
If you want to list the files
in a directory sorted by
date then you can use
the code below (probably could
be more efficient - but it works!)
$dir_name="/path/to/directory";
$dir = opendir($dir_name);
$basename = basename($dir_name);
$fileArr = array();
while ($file_name = readdir($dir))
{
if (($file_name !=".") && ($file_name != ".."))
{
#Get file modification date...
$fName = "$dir_name/$file_name";
$fTime = filemtime($fName);
$fileArr[$file_name] = $fTime;
}
}
Use arsort to get most recent first
and asort to get oldest first
arsort($fileArr);
$numberOfFiles = sizeOf($fileArr);
for($t=0;$t<$numberOfFiles;$t++)
{
$thisFile = each($fileArr);
$thisName = $thisFile[0];
$thisTime = $thisFile[1];
$thisTime = date("d M y", $thisTime);
echo"<b>$thisName</b> $thisTime <a href=\"thisphpfile.php?delete=".$thisName."\">".$thisName."</a>";
}
if(isset($delete))
{
unlink($delete)
echo "file Deleted";
}
closedir ($dir);
?>
check the code for errors before using it.
-=Levi=-