Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file1
- file2
- file3
- <p><strong>Output</strong></p>
- <!--?php
- //path to directory to scan
- $directory = "images/download/output/";
- $files = glob($directory . "*.pdf");
- array_multisort(array_map( 'filemtime', $files ),SORT_NUMERIC,SORT_DESC,$files);
- //print each file name
- foreach($files as $f) {
- $path_parts = pathinfo($f);
- echo '<p><a href="'.$f.'">'.$path_parts['filename'].'</a></p>';
- }
- ?-->
- <p> </p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement