Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with PEAR: File_Find

Status
Not open for further replies.

pgosse

Programmer
Sep 26, 2001
42
CA
Hi all. I've recently rewritten the course search engine for the university I work for, and now I need to go through the entire website and change specific links.

To do this I thought, easy, I'll just use File_Find() to get an array of ALL the files in the website.

However, when I run the following code:

Code:
echo '<strong>rewriting links...</strong><br><br>';
include('PEAR/File/Find.php');
$f = new File_Find();
$tmp_files = $f->maptree('/path/to/site/root/');
$files = $tmp_files[1];
die('count: '.count($files));
it only gives me 1650 files, and there are WAY more than 1650 files especially since this count hasn't even had the image or pdf files stripped out.

Here's the page in action:
Can anyone think of any idea why File_Find doesn't seem to be reading the directory tree correctly? I'm pointing at the right root directory, so I can't really see what the problem is. The script is running as the apache user, so permissions shouldn't be the problem.

Thanks in advance for any suggestions.

Cheers,
Pablo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top