tetsunosukeのnotebook

tetsunosukeのメモです

Smarty

http://sunset.freespace.jp/smarty/SmartyManual_2-6-6J_html/index.html

<?php
define('APP_HOME', '/var/www/html');

define('SMARTY_DIR', APP_HOME.'/lib/smarty/libs/');

require_once(SMARTY_DIR . "Smarty.class.php");

$smarty = new Smarty();

$smarty->template_dir = APP_HOME . '/smarty/templates/';
$smarty->compile_dir = APP_HOME .'/smarty/templates_c/';
$smarty->config_dir = APP_HOME .'/smarty/configs/';
$smarty->cache_dir = APP_HOME .'/smarty/cache/';

$smarty->assign('name','Ned');

$smarty->display('index.tpl');
?>