
Stworzyłem dwa pliki:
index.php położony w C:\Program Files\WebServ\httpd\testy
<?php // dla windows require_once(SMARTY_DIR . 'Smarty.class.php'); $smarty = new Smarty(); $smarty->template_dir = 'C:/program files/webserv/httpd/testy/smarty/guestbook/templates/'; $smarty->compile_dir = 'C:/program files/webserv/httpd/testy/smarty/guestbook/templates_c/'; $smarty->config_dir = 'C:/program files/webserv/httpd/testy/smarty/guestbook/configs/'; $smarty->cache_dir = 'C:/program files/webserv/httpd/testy/smarty/guestbook/cache/'; $smarty->assign('name','Ned'); $smarty->display('index.tpl'); ?>
oraz index.tpl położony w: C:\Program Files\WebServ\httpd\testy\smarty\questbook\templates
{* Smarty *}
Hello, {$name}!
a kiedy uruchamiam index.php to wyskakuje mi błąd :
Warning: Smarty error: unable to read resource: "index.tpl" in C:\Program Files\WebServ\httpd\libs\Smarty.class.php on line 1088
Nie wiem o co chodzi.
Z góry dzięki za pomoc