Re[2]: [SMARTY] unable to read template
| From: | Elgi | Date: | Fri, 21 Mar 2003 17:00:48 +0000 |
| Subject: | Re[2]: [SMARTY] unable to read template | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8817@lists.php.net to get a copy of this message | ||
Bonjour Monte,
Thanks, it's good now, i have :
define('SMARTY_DIR','../smarty/');
@require(SMARTY_DIR.'Smarty.class.php');
$smarty = new Smarty;
if(!$smarty->is_cached('fr/index.tpl')) {
$smarty->template_dir = '../templates/';
$smarty->compile_dir = '../templates_c/';
$smarty->config_dir = '../conf/';
$smarty->cache_dir = '../cache/';
$smarty->config_load('smarty.conf');
}
$smarty->display('fr/index.tpl');
Elgi
Le vendredi 21 mars 2003 à 17:52:51, vous écriviez :
MO> If you know the relative path, then do this:
MO> require('../smarty/Smarty.class.php');
MO> Smarty will figure out SMARTY_DIR on its own from there.
MO> Otherwise, SMARTY_DIR needs to be an absolute path.
MO> define('SMARTY_DIR', '/absolute/path/to/smarty/dir/');
MO> require(SMARTY_DIR . 'Smarty.class.php');
MO> Monte
MO> On Fri, 2003-03-21 at 10:17, Elgi wrote:
>> Bonjour smarty-general,
>>
>> I have a dir "fr" with index.php
>> and in "templates/fr" => index.tpl
>>
>> fr/index.php :
>> define('SMARTY_DIR','smarty/');
>> @require('../'.SMARTY_DIR.'Smarty.class.php');
>> $smarty = new Smarty;
>> $smarty->display('fr/index.tpl');
>>
>> Smarty say "unable to read template", why ?
>> --
>> Cordialement,
>> Elgi