![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 25 Pomógł: 0 Dołączył: 24.05.2003 Skąd: Łódź Ostrzeżenie: (0%) ![]() ![]() |
Mam sredni problemik ...
Potrzebuje liste plików z okreslonego katalogu, uporządkowanych w kolejności od daty ostatniej modyfikacji ( filecdate() albo filemtime() ) funkcja get_directory_file($path) wedlug Petera Mouldinga ![]() Kod function get_directory_file($path)
{ $path_id = opendir($path); while($file_name = readdir($path_id)) { if($file_name != "." and $file_name != "..") { $file["type"] = filetype($path . "/" . $file_name); if($file["type"] == "dir") { $file_array = get_directory_file($path . "/" . $file_name); if(isset($found)) { $found = array_merge($found, $file_array); } else { $found = $file_array; } } else { $file["changed"] = filectime($path . "/" . $file_name); $file["accessed"] = fileatime($path . "/" . $file_name); $file["group"] = filegroup($path . "/" . $file_name); $file["inode"] = fileinode($path . "/" . $file_name); $file["modified"] = filemtime($path . "/" . $file_name); $file["owner"] = fileowner($path . "/" . $file_name); $file["permissions"] = fileperms($path . "/" . $file_name); $file["size"] = filesize($path . "/" . $file_name); $found[$path][$file_name] = $file; } } } closedir($path_id); if(!isset($found)) { $found = array(); } return($found); } pozdrawiam i licze na to ze ktos mi :arrow: pomoze. ------------------------------- temat nie na PRO (DeyV) -------------------- ------
aven |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 05:17 |