PHP Classes

File: Usage.php

Recommend this page to a friend!
  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: 18 years ago
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($path, true);

//$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"
*/
?>

For more information send a message to info at phpclasses dot org.