Login   Register  
PHP Classes
elePHPant
Icontem

File: Usage.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Cristian Rusu  >  File Searcher  >  Usage.php  >  Download  
File: Usage.php
Role: Example script
Content type: text/plain
Description: How to use the class file
Class: File Searcher
Search for files in directories recursively
Author: By
Last change:
Date: 2004-03-07 01:44
Size: 517 bytes
 

Contents

Class file image Download
<?
//path relative to this file location
//you can use absolute path either
$path="docs";
require (
"FileSearcher.php");

//create the class with doc and htm filter
$files= new FileSearcher("doc htm");

//search recursively on $path for doc and htm
$filelist=$files->GetFiles($pathtrue);

//$filelist is an unidimensional array containign the path to the files
/*
something like
$filelist[0]="docs/1.doc"
$filelist[1]="docs/2.doc"
$filelist[2]="docs/usage.doc"
$filelist[3]="docs/allok.doc"
*/
?>