Example #1
0
<?php

define('PathPrefix', '/controllers/');
define('PathPostfix', 'Controller.php');
//SMARTY
$template = 'default';
define('TemplatePrefix', 'D:\\xampp\\htdocs\\mysite\\views\\default');
define('TemplatePostfix', '.tpl');
define('TemplateWebPath', "/templates/{$template}");
//ПІДКЛЮЧАЄМ САМУ БІБЛІОТЕКУ СМАРТІ
require '/library/Smarty/libs/Smarty.class.php';
$smarty = new Smarty();
$smarty->setTemplateDir(TemplatePrefix);
$smarty->setCompileDir('/tmp/smarty/template_c');
$smarty->setConfigDir('/library/Smarty/configs');
$smarty->SetCacheDir('/tmp/smarty/cache');
$smarty->assign('templateWebPath', TemplateWebPath);