Guest User

Untitled

a guest
Feb 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2. function getDir($dirname) {
  3. $list = scandir($dirname);
  4. foreach ($list as $k => $v) {
  5. if (!is_dir($v)) {
  6. echo "$k. $v<br>";
  7. } else {
  8. if ($v != "." && $v != "..") {
  9. echo "$k. <b>$v</b><br>";
  10. getDir($v);
  11. }
  12. }
  13. }
  14. }
Add Comment
Please, Sign In to add comment