[Smarty] configuration smarty et php 5
Bonjour,
j'ai installé la dernière version de smarty
Voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| require($_SERVER['DOCUMENT_ROOT'].'/Smarty-3.1.12/libs/Smarty.class.php');
class Smarty_extend extends Smarty
{
function Smarty_extend()
{
// Constructeur de la classe.
// Appelé automatiquement à l'instanciation de la classe.
$this->Smarty();
$this->template_dir = $_SERVER['DOCUMENT_ROOT'].$application.'/smarty/templates/';
$this->compile_dir = $_SERVER['DOCUMENT_ROOT'].$application.'/smarty/templates_c/';
$this->config_dir = $_SERVER['DOCUMENT_ROOT'].$application.'/smarty/configs/';
$this->cache_dir = $_SERVER['DOCUMENT_ROOT'].$application.'/smarty/cache/';
$this->caching = false;
$this->assign('app_name', $application);
}
}
$oSmarty = new Smarty_extend; |
J'ai le message suivant
Code:
Fatal error: Uncaught exception 'SmartyException' with message 'PHP5 requires you to call __construct() instead of Smarty()' in D:\wamp\www\Smarty-3.1.12\libs\sysplugins\smarty_internal_templatebase.php on line 803
Je ne comprends pas ce que veut dire ce message, sauf qu'il faut renommer $this->Smarty(); en autre chose ?
J'ai regardé les tutos d'Eric Pommereau mais nada, que d'chi, j'suis perdu.
Merci pour votre éclairage.