|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
vdom Smarty n00b
Joined: 17 Apr 2008 Posts: 1
|
Posted: Thu Apr 17, 2008 11:28 am Post subject: Activer le cache |
|
|
Salut,
index.php
Code: | $server_path = $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['PHP_SELF']);
require($server_path."/smarty/Smarty.class.php");
$smarty = new Smarty();
$smarty->template_dir = $server_path.'/templates/';
$smarty->compile_dir = $server_path.'/templates_c/';
// Cache | true / false
$smarty->cache_dir = $server_path.'/cache/';
$smarty->caching = false;
$smarty->compile_check = true;
// Config
$smarty->config_dir = $server_path.'/templates_conf/';
$smarty->config_overwrite = false;
$smarty->config_load('template.conf'); |
et
Smarty.class.php
Code: |
var $caching = 1;
var $cache_dir = 'cache';
var $cache_lifetime = 3600;
var $cache_modified_check = false;
|
Qu'est ce qui ne va pas ?
Merci |
|
Back to top |
|
john 'le borgne' Smarty Rookie
Joined: 15 Apr 2008 Posts: 9
|
Posted: Sun Apr 20, 2008 4:21 pm Post subject: |
|
|
Quote: | $smarty->caching = false; |
à true pour activer ...
et puis ne change pas les valeurs dans le fichier Smarty.class.php directement, mais dérive une classe de smarty et ajoutes-y ton code d'initialisation
a+
john |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|