Using below function we can get last uploaded file time.

filectime 

$path = “YOUR_FOLDER_PATH”

function listdir_by_date($path){
$dir = opendir($path);
$list = array();
while($file = readdir($dir)){
if ($file != ‘.’ and $file != ‘..’){
$ctime = filectime($path . $file);
$ctime = date(‘Y-m-d H:i:s’, $ctime);
$list[$file] = $ctime;
}
}
closedir($dir);
krsort($list);
return $list;
}

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...