PHP Classes

File: test1.php

Recommend this page to a friend!
  Classes of Andrioli Darvin   SpoolTemplate   test1.php   Download  
File: test1.php
Role: Example script
Content type: text/plain
Description: Simple example
Class: SpoolTemplate
Database report generation based on templates
Author: By
Last change:
Date: 20 years ago
Size: 348 bytes
 

Contents

Class file image Download
<?php

function foo()
{
return(
"text from foo");
}

function
foop($text)
{
return(
"my parameter:".$text);
}

require_once(
'sptpl.inc');
// require_once('sptpl_db.php');

$t=new sptpl();
$t->LoadTemplate('test1.xml');
$t->SetVar("name","George");
$t->SetVar("MyName","Sam");
$bar['foo']='Index foo';
$t->SetVar("bar",$bar);
$t->run("test1.txt");
?>