PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of deirathe   UI Template   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: sample use
Class: UI Template
Compile HTML templates into PHP scripts
Author: By
Last change: bcz
Date: 14 years ago
Size: 505 bytes
 

Contents

Class file image Download
<?php

function __autoload($cn)
{
   
$file = "frea".DIRECTORY_SEPARATOR.str_replace("_",DIRECTORY_SEPARATOR,$cn).".php";
    if(
is_readable($file))
        require_once(
$file);
   
}

header("Content-Type: text/plain");

$tpl = new Template();
$tpl->title = "Some sample title!!";
for(
$i=0;$i<10;$i++)
{
   
$arr[] = md5(microtime(true).mt_rand(0,time()));
}

$tpl->arr = $arr;

$st = microtime(true);
echo
$tpl->applyTemplate("app/test/tpl.php");
echo
"\n\n\n\n";
echo
microtime(true)-$st;

?>