Login   Register  
PHP Classes
elePHPant
Icontem

File: test4.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andrioli Darvin  >  SpoolTemplate  >  test4.php  >  Download  
File: test4.php
Role: Example script
Content type: text/plain
Description: Another example
Class: SpoolTemplate
Database report generation based on templates
Author: By
Last change:
Date: 2003-09-21 08:52
Size: 477 bytes
 

Contents

Class file image Download
<?php
/*
 * test 4: first complete example, data from MySql
 *
 * It show how to build a report about the product sold over two year
 */
function foo()
{
return(
"text from foo");
}

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

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

$t=new sptpl();
$t->LoadTemplate('test4.xml');
$t->SetVar("RepTitle","Product sold from DB");
$t->run("test4.txt");
?>