Reputation: 5
<?php
require_once SMARTY_DIR . 'Smarty.class.php';
class Application extends Smarty
{
public function __construct()
{
parent::Smarty();
$this->template_dir = TEMPLATE_DIR;
$this->compile_dir = COMPILE_DIR;
$this->config_dir = CONFIG_DIR;
}
}
?>
i m getting error as Fatal error: Call to undefined method Smarty::Smarty()
I have used a Smarty software in php project folder
but i m getting error
i m using this Smarty software first time in php
i m not getting the clue in this code
Upvotes: 1
Views: 1861
Reputation: 5248
To call the parent constructor you have to use
parent::__construct();
instead of parent::Smarty();
Upvotes: 1