<?php
require_once './class/Smarty/Smarty.class.php';  // Smarty classを読込む

$Smarty = new Smarty();  // Smarty classの生成

$Smarty->template_dir = './templates';        // Template Fileを置くディレクトリ
$Smarty->compile_dir  = './tmp/templates_c';  // コンパイルされたTemplateが置かれるディレクトリ
$Smarty->cache_dir    = './tmp/cache';        // Templateのキャッシュが格納されるディレクトリ
$Smarty->caching      = 1;                    // cacheを有効にする

// Templateに定義したキーワードへ値に割り付ける 
$Smarty->assign('title', 'Smarty予約変数の参照');
$Smarty->assign('contents', 'Hello World');

// 指定したテンプレートを展開 
$Smarty->display('HelloWorld2.tpl');
?>
