Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. file1
  2. file2
  3. file3
  4.  
  5. <p><strong>Output</strong></p>
  6. <!--?php
  7. //path to directory to scan
  8. $directory = "images/download/output/";
  9. $files = glob($directory . "*.pdf");
  10. array_multisort(array_map( 'filemtime', $files ),SORT_NUMERIC,SORT_DESC,$files);
  11.  
  12. //print each file name
  13. foreach($files as $f) {
  14. $path_parts = pathinfo($f);
  15. echo '<p><a href="'.$f.'">'.$path_parts['filename'].'</a></p>';
  16. }
  17. ?-->
  18. <p> </p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement