Re[3]: [SMARTY] unable to read template

From: Date: Fri, 21 Mar 2003 17:18:57 +0000
Subject: Re[3]: [SMARTY] unable to read template
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8818@lists.php.net to get a copy of this message
Bonjour Smarty, debug.tpl don't work i test : $smarty->debug_tpl = '../smarty/debug.tpl'; but it's not good Elgi Le vendredi 21 mars 2003 à 18:00:48, vous écriviez : E> Bonjour Monte, E> Thanks, it's good now, i have : E> define('SMARTY_DIR','../smarty/'); E> @require(SMARTY_DIR.'Smarty.class.php'); E> $smarty = new Smarty; E> if(!$smarty->is_cached('fr/index.tpl')) { E> $smarty->template_dir = '../templates/'; E> $smarty->compile_dir = '../templates_c/'; E> $smarty->config_dir = '../conf/'; E> $smarty->cache_dir = '../cache/'; E> $smarty->config_load('smarty.conf'); E> } E> $smarty->display('fr/index.tpl'); E> Elgi E> 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

« previous php.smarty.general (#8818) next »