File: examples/testcopy.php

Recommend this page to a friend!
  Classes of Jorge Castro  >  PHP Document Store One  >  examples/testcopy.php  >  Download  
File: examples/testcopy.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Document Store One
Store and retrieve key-value pairs in flat files
Author: By
Last change:
Date: 11 months ago
Size: 479 bytes
 

Contents

Class file image Download
<?php

use eftec\DocumentStoreOne\DocumentStoreOne;

include
"../lib/DocumentStoreOne.php";
echo
"test<br>";
try {
   
$flatcon = new DocumentStoreOne(dirname(__FILE__) . "/base", 'tmp',DocumentStoreOne::DSO_FOLDER);
} catch (
Exception $e) {
    die(
"Unable to create document store");
}

$flatcon->insertOrUpdate("original","it is the original document");
var_dump($flatcon->copy("original","copy"));
echo
"<br>wrong copy:<br>";
var_dump($flatcon->copy("originalwrong","copy"));


For more information send a message to info at phpclasses dot org.