[eluser]Unknown[/eluser]
Hi,
I am trying to integrate smarty in CI.
1] I made one smarty.php page in application/libraries folder which is including Smarty.class file
<?php require_once(APPPATH . 'libraries/smarty/Smarty.class.php'); ?>
2] I made one function in class blog blog.php file inside controller folder
function test_Smarty()
{
$this->load->library('smarty');
$this->smarty->template_dir = APPPATH . 'smarty/templates/';
$this->smarty->compile_dir = APPPATH . 'smarty/templates_c/';
$this->smarty->cache_dir = APPPATH . 'smarty/cache/';
$this->smarty->config_dir = APPPATH . 'smarty/configs/';
$this->smarty->assign('name', 'Ned');
$this->smarty->display('index.tpl');
}
3] I have made index.tpl and kept in templates folder. I'm trying to run the file. It giving error.
A PHP Error was encountered
Severity: User Warning
Message: Smarty error: unable to read resource: "index.tpl"
Filename: smarty/Smarty.class.php
Line Number: 1095
Can anybody help me out.
Thanks,
vasu.