Kod
<?php
include_once('configuration.php');
include_once(SMARTY_CLS_DIR.'Smarty.class.php');
$smarty=new Smarty;
$smarty->template_dir=SMARTY_TPL_DIR;
$smarty->cache_dir=SMARTY_CACHE_DIR;
$smarty->compile_dir=SMARTY_COMPILE_DIR;
...
$smarty->assign('study_visit', $_POST['study_visit']);
$smarty->assign('theatrical_sumr', $_POST['theatrical_sum']);
...
(w pliku formindex.php)include_once('configuration.php');
include_once(SMARTY_CLS_DIR.'Smarty.class.php');
$smarty=new Smarty;
$smarty->template_dir=SMARTY_TPL_DIR;
$smarty->cache_dir=SMARTY_CACHE_DIR;
$smarty->compile_dir=SMARTY_COMPILE_DIR;
...
$smarty->assign('study_visit', $_POST['study_visit']);
$smarty->assign('theatrical_sumr', $_POST['theatrical_sum']);
...
przy czym configuration.php:
Kod
<?php
define('SMARTY_CLS_DIR', '/usr/local/share/smarty/');
define('SMARTY_TPL_DIR', '/home/pllai/public_html/inc/en/templates/tpl/');
define('SMARTY_CACHE_DIR', '/home/pllai/public_html/inc/en/templates/cache/');
define('SMARTY_COMPILE_DIR', '/home/pllai/public_html/inc/en/templates/compile/');
?>
...
define('SMARTY_CLS_DIR', '/usr/local/share/smarty/');
define('SMARTY_TPL_DIR', '/home/pllai/public_html/inc/en/templates/tpl/');
define('SMARTY_CACHE_DIR', '/home/pllai/public_html/inc/en/templates/cache/');
define('SMARTY_COMPILE_DIR', '/home/pllai/public_html/inc/en/templates/compile/');
?>
...
natomiast w pliku formindex.tpl kod wygląda tak:
Kod
<input type="text" name="study_visit" value="{$smarty.post.study_visit}" />
<input type="text" name="theatrical_sum" value="{$smarty.post.theatrical_sum}" />
<input type="text" name="theatrical_sum" value="{$smarty.post.theatrical_sum}" />
Niestety problem polega na tym ze nie chce mi dodać tych 2 pól do '/home/pllai/public_html/inc/en/templates/compile/')
Wszystko przebiegłoby bez problemów, lecz nie mam dostępu do Smarty (do /usr/local/share/smarty/) (nie moge dodawać kodu do definicji szablonów), a wydaje mi się że tutaj tylko tego brakuje, ktoś może wie jak sie za to zabrać ?