PHP Classes

File: exampleScript

Recommend this page to a friend!
  Classes of Er. Rochak Chauhan   Create File By Parsing Dir   exampleScript   Download  
File: exampleScript
Role: Example script
Content type: text/plain
Description: exampleScript
Class: Create File By Parsing Dir
Create a CSV with a list of files of a directory
Author: By
Last change: Added new feature
Date: 18 years ago
Size: 761 bytes
 

Contents

Class file image Download
<?Php
require('CreateFileByParsingDir.inc.php');
$createFileByParsingDir = new CreateFileByParsingDir;

// sets the extentions of file(s) you are looking for
$createFileByParsingDir->setArrayOfExtensions('jpg, BMP, gif');

// set the base directory, from where this script should begin scanning.
// if no arguments are set, the script will scan from the default web root directory
// PS end the dir path with slash (either \\ for windows or / for Unix platform)

//$createFileByParsingDir->setRootDirectory("C:\\Inetpub\\wwwroot\\");
$createFileByParsingDir->setRootDirectory("C:\\Inetpub\\wwwroot\\", "http://www.domain.com//");

// creates the CSV file of the result
$createFileByParsingDir->createCSVFile("\r\n", "rochak.txt", 'C:\\Inetpub\\wwwroot\\' );

?>