SHARE
TWEET

Untitled

a guest May 21st, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. function iterateDirectory($i)
  3. {
  4.     echo '<ul>';
  5.     foreach ($i as $path) {
  6.         if ($path->isDir())
  7.         {
  8.             echo '<li>';
  9.             iterateDirectory($path);
  10.             echo '</li>';
  11.         }
  12.         else
  13.         {
  14.             echo '<li>'.$path.'';
  15.             echo "<form action='delete.php' method='POST'>";
  16.             echo "<button type='submit' class='btn btn-secondary'>Delete image</button>";
  17.             echo "</form>";
  18.             echo "</li>";
  19.         }
  20.     }
  21.     echo '</ul>';
  22. }
  23.  
  24. $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($curuser));
  25.  
  26. iterateDirectory($iterator);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top