[eluser]AlexMason[/eluser]
I'm using smarty template engine and I am getting a strange error message even though I loaded the library.
Here is my error:
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Index::$parser
Filename: controllers/index.php
Line Number: 24
( ! ) Fatal error: Call to a member function parse() on a non-object in C:\xampp\htdocs\application\controllers\index.php on line 24
Call Stack
# Time Memory Function Location
1 0.0020 352400 {main}( ) ..\index.php:0
2 0.0104 425392 require_once( 'C:\xampp\htdocs\system\core\CodeIgniter.php' ) ..\index.php:202
3 0.0568 1329104 Index->index( ) ..\CodeIgniter.php:308
Here is my controller code:
Code:
<?php
/**
* @property CI_Loader $load
* @property CI_Form_validation $form_validation
* @property CI_Input $input
* @property CI_Email $email
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
* @property MY_Parser $parser
*/
class Index extends CI_Controller {
public function index()
{
$data['title'] = "The Marketing Image INC.";
$this->parser->parse("header.tpl", $data);
$this->parser->parse("home.tpl", $data);
$this->parser->parse("footer.tpl", $data);
}
}
?>
I have auto loaded my parser library but I am getting this error.