[PHP] Re: Newbie: Site search, more than one directory

2001-07-31 Thread Richard Lynch
>$cmdstr = "grep -i $searchstr *"; Add a "-r" in there before or after the -i part. "-r" will have grep search recursively. Read "man grep" for details. Warning: This will impact the performance of grep considerably if your site is deep/broad... -- PHP General Mailing List (ht

[PHP] RE: Newbie: Site search, more than one directory

2001-07-31 Thread Tim Ward
I have used this for a simple site map, it (or at least the principles involved) should do what you want. The trick is to put your search in a recursive function, that calls itself when the file is a directory. function sitemap($path) { if ($dhandle = opendir($path)) { echo(""