Re: Object or such for building a directory tree?
| From: | Michelle Konzack | Date: | Sat, 01 May 2010 23:49:30 +0000 |
| Subject: | Re: Object or such for building a directory tree? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-304835@lists.php.net to get a copy of this message | ||
Hello tedd,
Am 2010-05-01 11:54:45, hacktest Du folgendes herunter:
> Now on to your problem. You want to take a multidimensional array
> that contains the names of directories and names of the files
> contained therein and show them in a file tree where you can open
> and close the nodes of the tree to show contents -- is that correct?
Yes for the File-Browser. The IMAP Browser need only the directory
structure, but...
> It's pretty simple to populate an array in PHP to contain
> directories and files. To do this via PHP can produce something like
> this:
>
> http://php1.net/b/file-browser
But where is the PHP script? There is no link to download the ZIP.
> I'm not happy with the result because it doesn't show a file tree
> complete with clickable nodes.
Yeah... This is what I am missing too.
> While I am sure it's possible to do this in PHP, I was thinking that
> javascript might provide a better functional solution (i.e.,
> client-side with less trips to the server). Namely have PHP create
> the array and then have javascript show it.
>
> This is what I found:
>
>
> http://labs.abeautifulsite.net/projects/js/jquery/fileTree/demo/
But it uses AJAX which I can not use. I must check it again, because I
need a custom connector and have only to output this:
<ul class="jqueryFileTree" style="display: none;">
<li class="directory collapsed"><a href="#"
rel="/this/folder/">Folder Name</a></li>
(additional folders here)
<li class="file ext_txt"><a href="#"
rel="/this/folder/filename.txt">filename.txt</a></li>
(additional files here)
</ul>
which I, more or less, have already.
This mean, for IMAP I have simply to s/./_/g
Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
--
##################### Debian GNU/Linux Consultant ######################
Development of Intranet and Embedded Systems with Debian GNU/Linux
<http://www.itsystems.tamay-dogan.net/>
<http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>
<http://www.can4linux.org/>