Reply to Re: Directory Recursion and Multidimensional Arrays

Your name:

Reply:


Posted by Tyrone Slothrop on 09/27/06 04:32

On Tue, 26 Sep 2006 15:03:24 GMT, Oli Filth <catch@olifilth.co.uk>
wrote:

>1. In each array (or sub-array), have $array[0] be the directory name,
>and then $array[1], $array[2], ... be the sub-arrays.
>
>2. Have each element of the array be a class object, e.g.:
>
> class Directory
> {
> public $name;
> public $contents;
> }
>
>where $contents is an array of child Directory objects.
>
>
>As for implementation, you will need to add an extra argument to the
>scan_dir_recurse() function, which you will use to pass the current
>parent directory object. Then scan_dir_recurse can add child objects to
>it as it finds them.

After making myself crazy with this, I think AJAX can do what I need
quite well, particurly since the directory structure is four deep and
there are duplicate directory and file names. The first select will
show the first set of directories. onSelect will generate and display
the next set of directories from a call to the script, etc. The only
gotcha is that the script is going to have to know what is a file and
what is a directory.

It ought to be an interesting application. ;-)

Thanks!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация