Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Richard Munroe  >  dm.File  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example of use of File
Class: dm.File
Wrapper for processing file contents
Author: By
Last change:
Date: 2007-11-30 01:57
Size: 332 bytes
 

Contents

Class file image Download
<?php

/**
 * Simple example of use of the File wrapper class.
 */

include_once 'class.File.php' ;

function 
process(
    
$theFile)
{
    while (
$line $theFile->gets())
    {
        echo 
$line ;
    }

    return 
'Processed: ' $theFile->getName() ;
}

$a = new File('license.txt''r''process') ;

echo 
$a->getStatus() ;
?>