<?php
require_once("cimporter.php");
define(ALLOW_EXEC,1);
CImporter::getInstance()->import("library","cserializableobjectregistry.php");
CImporter::getInstance()->import("driver","csomething1filedriver.php");
$reg = new CSerializableObjectRegistry(new CSomething1FileDriver(),
CConfiguration::root_path."/"."data_samples/something1.txt"); //use absolute path always
echo $reg->get("db_host")."</br>"; //first, look at something1.txt content
$reg->set("db_host","hostname_after_run");
echo $reg->get("db_host")."</br>"; //now, something1.txt has been modified
//add comment ('//') to this command to make sure that something1.txt has been modified
$reg->set("db_host","hostname_before_run");
//like this:
//$reg->set("db_host","hostname_before_run");
//then check out the something1.txt directly (using text editor)
?>
|