Login   Register  
PHP Classes
elePHPant
Icontem

File: example1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Rick Hodger  >  filesnap  >  example1.php  >  Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Example 1
Class: filesnap
Stream wrapper to write and read snapshot files
Author: By
Last change:
Date: 2006-12-31 10:05
Size: 380 bytes
 

Contents

Class file image Download
<?php

/**
 * In this example we use the filesnap stream wrapper to write to a file.
 * Each time this script is called, the wrapper will make a new snapshot of 'test.txt',
 * and then write an additional line onto the end of the script.
 */

require("filesnap.class.php");

if (
$fp=fopen('snapshot://test.txt','a')) {
    
fwrite($fp,"Wrote one line of text\n");
    
fclose($fp);
}

?>