configurazione di smarty e creazione template di prova
2 files added
1 files modified
New file |
| | |
| | | {* Smarty *} |
| | | <h1>CIAO {$name|escape} , sono un test</h1> |
New file |
| | |
| | | <?php |
| | | /* Smarty version 5.0.2, created on 2024-04-22 08:54:09 |
| | | from 'file:prova.tpl' */ |
| | | |
| | | /* @var \Smarty\Template $_smarty_tpl */ |
| | | if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array ( |
| | | 'version' => '5.0.2', |
| | | 'unifunc' => 'content_662625b1b06c99_86678678', |
| | | 'has_nocache_code' => false, |
| | | 'file_dependency' => |
| | | array ( |
| | | '1698bfc7660d075fc1da51ffcbca3e8d0f1483a5' => |
| | | array ( |
| | | 0 => 'prova.tpl', |
| | | 1 => 1713776044, |
| | | 2 => 'file', |
| | | ), |
| | | ), |
| | | 'includes' => |
| | | array ( |
| | | ), |
| | | ))) { |
| | | function content_662625b1b06c99_86678678 (\Smarty\Template $_smarty_tpl) { |
| | | $_smarty_current_dir = 'C:\\Users\\dell\\Documents\\Lavoro\\echophp\\htdocs\\files_comuni\\smarty\\templates'; |
| | | ?><h1>CIAO <?php echo htmlspecialchars((string)$_smarty_tpl->getValue('name'), ENT_QUOTES, 'UTF-8', true);?> |
| | | , sono un test</h1><?php } |
| | | } |
| | |
| | | <?php |
| | | echo "ciao sono una stringa"; |
| | | |
| | | require '../vendor/autoload.php'; |
| | | use Smarty\Smarty; |
| | | $smarty = new Smarty(); |
| | | |
| | | $smarty->setTemplateDir('files_comuni/smarty/templates'); |
| | | $smarty->setConfigDir('files_comuni/smarty/configs'); |
| | | $smarty->setCompileDir('files_comuni/smarty/templates_c'); |
| | | $smarty->setCacheDir('files_comuni/smarty/cache'); |
| | | $smarty->testInstall(); |
| | | |
| | | $smarty->assign('name', 'Filippo'); |
| | | $smarty->display('prova.tpl'); |
| | | |
| | | echo "ciao sono una stringa"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ?> |