progetto di prova che mostra le macchine fiat e un form che permette di contattare
filippo.bertilotti
2024-04-22 f0fc431013f7270e317f8ab9c03166221575c3a6
configurazione di smarty e creazione template di prova
2 files added
1 files modified
51 ■■■■■ changed files
htdocs/files_comuni/smarty/templates/prova.tpl 2 ●●●●● patch | view | raw | blame | history
htdocs/files_comuni/smarty/templates_c/1698bfc7660d075fc1da51ffcbca3e8d0f1483a5_0.file_prova.tpl.php 27 ●●●●● patch | view | raw | blame | history
htdocs/index.php 22 ●●●●● patch | view | raw | blame | history
htdocs/files_comuni/smarty/templates/prova.tpl
New file
@@ -0,0 +1,2 @@
{* Smarty *}
<h1>CIAO {$name|escape} , sono un test</h1>
htdocs/files_comuni/smarty/templates_c/1698bfc7660d075fc1da51ffcbca3e8d0f1483a5_0.file_prova.tpl.php
New file
@@ -0,0 +1,27 @@
<?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 }
}
htdocs/index.php
@@ -1,3 +1,23 @@
<?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";
?>