Re: is it possible to scann subdirectories?

From: Date: Fri, 12 Apr 2002 13:35:23 +0000
Subject: Re: is it possible to scann subdirectories?
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-18454@lists.php.net to get a copy of this message
write recursive function that uses PHP's functions for directory reading. function read_rec($dir_name){ open_the_dir_name while (read_from_the_dir){ if (name_type=dir){ read_rec($name); }else{ // the file is file not dir // make your check here } } } in pseudo code. HTH Andrey Hristov ----- Original Message ----- From: "andy" <news.letters@gmx.de> To: "Andrey Hristov" <ahristov@icygen.com> Sent: Friday, April 12, 2002 3:58 PM Subject: Re: [PHP] is it possible to scann subdirectories? > This looks for me like an unix command line. Does this work in php as well? > > I did write the script for php, because I do not have a clue of shell > script. > > thanx, Andy > ----- Original Message ----- > From: "Andrey Hristov" <ahristov@icygen.com> > Newsgroups: php.general > To: "andy" <news.letters@gmx.de> > Cc: <php-general@lists.php.net> > Sent: Thursday, April 11, 2002 5:31 PM > Subject: Re: [PHP] is it possible to scann subdirectories? > > > > make recursive function for this. > > or > > use some external comment to find your files. > > for example : find is a good choice > > find -type f / -exec grep ohmygoodness {} \; > > > > will look in every file for "ohmygoodness" > > > > Andrey > > ----- Original Message ----- > > From: "andy" <news.letters@gmx.de> > > To: <php-general@lists.php.net> > > Sent: Thursday, April 11, 2002 6:28 PM > > Subject: [PHP] is it possible to scann subdirectories? > > > > > > > Hi there, > > > > > > I have to change several filenames in lots of subdirs. > > > > > > The script for changing filenames already works. How could I extend this > to > > > include all subdirs? > > > > > > thanx, Andy > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > >

« previous php.db (#18454) next »