PHP Classes

File: example2.php

Recommend this page to a friend!
  Classes of Rick Hodger   filesnap   example2.php   Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: Example 2
Class: filesnap
Stream wrapper to write and read snapshot files
Author: By
Last change:
Date: 17 years ago
Size: 554 bytes
 

Contents

Class file image Download
<?php

/**
 * In this example, we have added an extra paramter to the filepath.
 * This causes the filediff class to attempt to locate and open the file as it was at that
 * paticular point in time, in this case on 31/12/2006 at 15:30:00
 *
 * Note that when you use this, it will only allow read-only mode on the files. Any attempt to open a file
 * in read/write mode will cause a failure.
 */

require("filesnap.class.php");

if (
$fp=fopen('snapshot://test.txt+20061231153000','r')) {
    while(!
feof($fp)) {
        echo
fgets($fp,72);
    }
   
fclose($fp);
}

?>