Guest User

Untitled

a guest
Jun 18th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1.  
  2. $tree = new data_tree;
  3.  
  4. function list_files($directory, $subid)
  5. {
  6. static $id_counts = 1;
  7. foreach(glob($directory) as $filename)
  8. {
  9. $tree->add($id_counts, $subid, $filename); // <<-- this line
  10. echo $filename . "<br>";
  11. if(is_dir($filename)) list_files($filename . "/*", $subid);
  12. }
  13. }
  14.  
  15. list_files("*", 0);
Add Comment
Please, Sign In to add comment