PHP Classes

File: example1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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: 8 years ago
Size: 380 bytes


Class file image Download

 * 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.


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