<?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");
?>
|