johnmahugu

php - list files in directory with active link

Jun 25th, 2015
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. <a href="<?php echo $_SERVER["REQUEST_URI"];?>">Refresh</a>
  2.  
  3. <title>Welcome </title>
  4. <h1>Welcome to john mahugus home page</h1>
  5.  
  6. <p>Scripts in the www/ directory:</p>
  7.  
  8. <?php
  9.  
  10. $files = glob("./*");
  11. foreach ($files as $file) {
  12.     $file = basename($file);
  13.     if ($file and $file[0] == "_") {
  14.         continue;
  15.     }
  16.     printf("<a href='%s'>%s</a><br>", $file, $file);
  17. }
  18.  
  19. ?>
  20.  
  21. <h2>Notes</h2>
  22.  
  23. <ul>
  24. <li>To disable debugging console window, edit the settings.json
  25.     file and change the "show_console" setting to false.</li>
  26. </ul>
  27.  
  28. <hr>
  29. Project website:
  30. <a href="http://code.google.com/p/phpdesktop/">
  31.     http://code.google.com/p/phpdesktop/
  32. </a>
  33.  
  34. <br><br><br><br>
  35. <br><br><br><br>
  36. <br><br><br><br>
  37. <br><br><br><br>
  38. <br><br><br><br>
  39. <br><br><br><br>
  40. <br><br><br><br>
  41. <br><br><br><br>
  42. <br><br><br><br>
  43. <br><br><br><br>
  44. <br><br><br><br>
  45. <br><br><br><br>
Advertisement
Add Comment
Please, Sign In to add comment