<?php
 
    /**
 
     * Include the class
 
     */
 
    require_once('./template.class.php');
 
 
    /**
 
     * Construct
 
     */
 
    $temp = new Template();
 
 
    /**
 
     * Start output buffer using ob_start() before 
 
     * outputting anything, else it won't work!
 
     */
 
    ob_start();
 
 
    /**
 
     * Configure to clean output before compiling
 
     */
 
    $temp->set_option('cleanoutput', true);
 
 
    /**
 
     * Print some random data out
 
     */
 
    echo("Foo");
 
 
    /**
 
     * Add some cache
 
     */
 
    $temp->addcache('Bar');
 
 
    /**
 
     * Compile
 
     */
 
    $temp->compile();
 
?>
 
 |