PHP Classes

File: examples/include.php

Recommend this page to a friend!
  Classes of tokkara   Simphple   examples/include.php   Download  
File: examples/include.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simphple
Process templates compiling into PHP code
Author: By
Last change: simphple version 1.1.0
Date: 11 years ago
Size: 777 bytes
 

Contents

Class file image Download
<?php
include '../simphple/data_store/data_store.intfc.php';
include
'../simphple/data_store/data_store_file.class.php';

include
'../simphple/template/template_code.class.php';
include
'../simphple/template/template.class.php';
include
'../simphple/template/template_function.class.php';
include
'../simphple/template/template_tools.class.php';

$dsf = new Sphp_Data_Store_File('cache/', true, true);
$options = array('debug' => false, 'template_dir_path' => 'templates/', 'vars_without_keys' => Sphp_Template::VARS_WK_ENABLED_MODIFIERS);
$tpl = new Sphp_Template($dsf, $options);

$tpl->add_variable('var1', 'templates1/include1.html');
$tpl->add_variable('var2', 'File 1; value 2');
$tpl->add_variable('var3', 'value');

$tpl->display_file('include.html');