Search found 5 matches

by mr_man
Mon Nov 21, 2011 5:50 am
Forum: PHP - Code
Topic: Directory tree array won't show nested directories [FIXED!]
Replies: 6
Views: 621

Re: Directory tree array won't show nested directories

That's it....

Code: Select all

$tree_array = getDirectory("$path/$file", ($level+1), $tree_array); 
I knew it would be something really simple I was missing. Thank you!
by mr_man
Mon Nov 21, 2011 5:30 am
Forum: PHP - Code
Topic: Directory tree array won't show nested directories [FIXED!]
Replies: 6
Views: 621

Re: Directory tree array won't show nested directories

This code functions and will give you the results i'm seeing if you want to copy and paste $tree_array = getDirectory("."); echo "<pre>"; print_r($tree_array); echo "</pre>"; function getDirectory( $path = '.', $level = 0,$tree_array = array()){ // Directories to ignore...
by mr_man
Mon Nov 21, 2011 5:27 am
Forum: PHP - Code
Topic: Directory tree array won't show nested directories [FIXED!]
Replies: 6
Views: 621

Re: Directory tree array won't show nested directories

Nope, that still gives the same result only showing the 1st level directories.....If I echo the array with each iteration I can see that it appears to be resetting the array somewhat. You'll see it shows the subdirectories of the includes directory and then in the next iteration it only shows the in...
by mr_man
Mon Nov 21, 2011 4:33 am
Forum: PHP - Code
Topic: Directory tree array won't show nested directories [FIXED!]
Replies: 6
Views: 621

Re: Directory tree array won't show nested directories

This is what the inline echo statement outputs (which is displayed the way that I'm trying to get the array structure to be): ./ftp ./ftp/ftp_log ./images ./images/makethis ./images/animated_this ./images/animated ./ftp_src ./includes ./includes/functions ./includes/fish ./includes/classes ./include...
by mr_man
Sun Nov 20, 2011 10:40 pm
Forum: PHP - Code
Topic: Directory tree array won't show nested directories [FIXED!]
Replies: 6
Views: 621

Directory tree array won't show nested directories [FIXED!]

I'm trying to hack this script to return an array with a full directory listing that includes nested directories. I'm trying to make it return only the directories with no file names. As I have it now it only returns the 1st level directories. I'm sure that I'm missing something really simple but I'...