Login   Register  
PHP Classes
elePHPant
Icontem

File: example_highlight.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kalle Sommer Nielsen  >  Template Processor  >  example_highlight.php  >  Download  
File: example_highlight.php
Role: Example script
Content type: text/plain
Description: Example file - Basic highlight feature
Class: Template Processor
Template processing engine
Author: By
Last change:
Date: 2007-01-20 17:25
Size: 576 bytes
 

Contents

Class file image Download
<?php
    
/**
     * Include the class
     */
    
require_once('./template.class.php');

    
/**
     * Construct
     */
    
$temp = new Template();

    
/**
     * Configurere the class
     */
    
$temp->set_option('highlight'true);

    
/**
     * To disable the change of font used, then set the option
     * 'highlightmono' to false
     *
     *     $temp->set_option('highlightmono', false);
     *
     */

    /**
     * Add some cache
     */
    
$temp->addcache("<?php\n\t/**\n\t * Classic Hello World Example\n\t */\n\n\techo(\"Hello World\\n\");\n?>");

    
/**
     * Compile
     */
    
$temp->compile();
?>