How to setup smarty 3.1.30 to codeigniter 3.0.4 |
Hi I have a problem with integrating the smarty into my codeigniter.
Here's what I did: 1. Autoloader.php (application\config\Autoloader.php) Code: $autoload['libraries'] = array('template'); 2. Template.php (application\libraries\Template.php) Code: include_once(APPPATH.'libraries/smarty/Smarty.class.php'); 3. created folder "smarty" under libraries PATH: application > libraries > - smarty (folder) - index (html forbiden) - Template (php) 4. copied and pasted the files inside "smarty" folder PATH: application > libraries > smarty - plugins (folder) - sysplugins (folder) - Autoloader (php - from smarty master file) - debug (tpl - from smarty master file) - Smarty.class (php - from smarty master file) - SmartyBC.class (php - from smarty master file) 5. The code only in contactus controller is this Code: class Contactus extends CI_Controller { 6. Tried to go to a page (http://localhost/citest04/contactus/test) but I still get this error message Fatal error: Cannot redeclare class template in C:\xampp\htdocs\citest04\application\libraries\Template.php on line 23 |
Welcome Guest, Not a member yet? Register Sign In |