Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $dir = '~/public_html/files';
- $dp = opendir($dir);
- $files = array();
- if ($dp) {
- while ($file = readdir($dp)) {
- if (is_dir("$dir$file")) {
- $innerdp = opendir("$dir$file");
- if ($innerdp) {
- while ($innerfile = readdir($innerdp)) {
- $files[$file][] = $innerfile;
- }
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement