Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function iterateDirectory($i)
- {
- echo '<ul>';
- foreach ($i as $path) {
- if ($path->isDir())
- {
- echo '<li>';
- iterateDirectory($path);
- echo '</li>';
- }
- else
- {
- echo '<li>'.$path.'';
- echo "<form action='delete.php' method='POST'>";
- echo "<button type='submit' class='btn btn-secondary'>Delete image</button>";
- echo "</form>";
- echo "</li>";
- }
- }
- echo '</ul>';
- }
- $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($curuser));
- iterateDirectory($iterator);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement