Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $tree = new data_tree;
- function list_files($directory, $subid)
- {
- static $id_counts = 1;
- foreach(glob($directory) as $filename)
- {
- $tree->add($id_counts, $subid, $filename); // <<-- this line
- echo $filename . "<br>";
- if(is_dir($filename)) list_files($filename . "/*", $subid);
- }
- }
- list_files("*", 0);
Add Comment
Please, Sign In to add comment