Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul>
- <?php
- $folder = 'uploads'; // Ganti dengan path folder yang diinginkan
- $files = scandir($folder, SCANDIR_SORT_ASCENDING);
- // Membalik urutan file
- $files = array_reverse($files);
- // Menampilkan file sebagai link
- foreach ($files as $file) {
- if (is_file($folder . '/' . $file)) {
- $fileSizeMB = round(filesize($folder . '/' . $file) / (1024 * 1024), 2);
- echo '[' . $fileSizeMB . 'MB] <a href="' . $folder . '/' . $file . '">' . $file . '</a> - ' . date("F d Y H:i:s.", filemtime($folder . '/' . $file)) . "<br>";
- }
- }
- ?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement