Re: directory structure list
| From: | Mike Frazer | Date: | Fri, 25 Jan 2002 02:29:23 +0000 |
| Subject: | Re: directory structure list | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82002@lists.php.net to get a copy of this message | ||
Anyone who wants to see the directory and filesystem fiunctions in action
together can go to http://www.invertedmind.com/baby/
(pardon the images,
they're of my nephew, I originally wrote the script because directory
listings are turned off on the server). If you want a copy of the script
you can email me, as I don't yet have my script site up (gotta get the
server over to my co-loc provider first).
Mike Frazer
"Erik Price" <pricee@hhbrown.com> wrote in message
news:FF6979B9-111C-11D6-AA44-0050E4857868@hhbrown.com...
> Hmm... I'm not familiar with the directory functions yet.
>
> But perhaps you can use
ls -F somehow -- this prints the name
> of each
> file in the directory with a special character to denote its type. For
> directories, this is a forwardslash. I.e:
>
> localhost:~/Documents/Media Lab$ ls -F
> (admin)index.php/ filerequest.php/
> medialabproposal.txt
> DBcreatefiles/ filesSQL.txt
> oldcrapfromthisproject/
> DBqueryfiles/ filespeopleSQL.txt
> papercost.txt
> Icon? mainfoot.inc
> peopleSQL.txt
> SQL_statements/ mainhead.inc
> temp_php/
> changes(12-20) materialscalc.txt to-
> do.txt
> dbcrit.txt medialab_db-dump-02-01-07/
>
> Maybe this can be coupled with directory functions in a creative
> fashion....
>
> Good luck,
> Erik
>
>
> On Thursday, January 24, 2002, at 03:45 PM, sean@interconnect.is.it
> wrote:
>
> > Hello,
> >
> > I need to print out a list of directories, which is a piece of cake,
> > just do something out of the manual:
> > <?php
> > $handle = opendir('.');
> > while (false != ($file = readdir($handle))) {
> > if ( ($file != ".") && ($file != "..") && (is_dir
> > ($file)) )
> > echo "<li>$file</li>\n";
> > }
> > closedir($handle);
> > ?>
> >
> > The thing is, I need the sub-directories, and the sub-directories under
> > them... ad infinitum in a list format.
> > i.e.
> > *Dir1
> > *SubDir1of1
> > *SubDir2of1
> > *Dir2
> > *SubDir1of2
> > *SubSubDir1of2
> > ... etc.
> >
> > There are some truly great php applications for this, such as:
> > http://freshmeat.net/projects/phpmyexplorer/
> > But it's way ahead of what I need.
> >
> > Any crafty suggestions?
> >
> > Thanks for any input,
> >
> > Sean
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
>