<? require_once("libs/Smarty.class.php"); $smarty = new Smarty(); $smarty -> template_dir = "templates/" ; //katalog szablonów $smarty -> compile_dir = 'templates_c/' ; // katalog skompilowanych szablonów $smarty -> cache_dir = 'cache/'; $smarty -> assign('title' , 'To jest') ; $smarty -> assign('content' , 'To jest') ; $smarty -> display('index.tpl'); ?>
Cytat
Fatal error: Uncaught exception 'SmartyException' with message 'Call of unknown function 'assign'.' in /home/projekty53/domains/projekty53.domena.pl/public_html/smarty/libs/Smarty.class.php:788 Stack trace: #0 /home/projekty53/domains/projekty53.domena.pl/public_html/smarty/index.php(10): Smarty->__call('assign', Array) #1 /home/projekty53/domains/projekty53.domena.pl/public_html/smarty/index.php(10): Smarty->assign('content', 'To jest') #2 {main} thrown in /home/projekty53/domains/projekty53.domena.pl/public_html/smarty/libs/Smarty.class.php on line 788
assign() - o co chodzi, że ta metoda się nie wywołuje ? Gdzie mam błąd ?