Pisem php skriptu koja ce mi procitati sadrzaj foldera (.txt fajlovi), i sortirati ih u listu po vremenu modifikacije!
Code:
<?php
if ($handle = opendir('.')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "$entry\n";
}
}
closedir($handle);
}
?>
<?php
if ($handle = opendir('.')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "$entry\n";
}
}
closedir($handle);
}
?>
Ovo mi izlista fajlove poredano po abecedi, medjutim meni treba sort() po (last modified) atributu!
Samo Tari!!!