Fatal error: Smarty error: the $compile_dir '/templates_c' does not exist, or is not a directory. in C:\xampp\htdocs\NS\smarty\libs\Smarty.class.php on line 1088.
Can any body resolve my this error ?
Help needed in smarty error
Moderator: General Moderators
Re: Help needed in smarty error
Example 2-9 on http://www.smarty.net/manual/en/install ... .basic.php
You need to give smarty a directory where it will cache it's compiled templates.
You need to give smarty a directory where it will cache it's compiled templates.
Code: Select all
<?php
require_once(SMARTY_DIR . 'Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = '/web/www.example.com/guestbook/templates/';
$smarty->compile_dir = '/web/www.example.com/guestbook/templates_c/';
$smarty->config_dir = '/web/www.example.com/guestbook/configs/';
$smarty->cache_dir = '/web/www.example.com/guestbook/cache/';
$smarty->assign('name','Ned');
//** un-comment the following line to show the debug console
//$smarty->debugging = true;
$smarty->display('index.tpl');
?>-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: Help needed in smarty error
Remember too that the 'templates_c' directory must be writeable.