Re: Problem with caching and config_load

From: Date: Thu, 25 Sep 2003 00:46:47 +0000
Subject: Re: Problem with caching and config_load
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10265@lists.php.net to get a copy of this message
Franco Fallica wrote:
Hi I have a problem with config_load if i have caching set to true. The first time i run it, it works fine. The second time i get: Warning: Smarty error: unable to read resource: "cdtipp.conf" in /home/cdtipp/smarty/libs/Smarty.class.php on line 1157 config_dir etc. is set. If i turn off caching evrything works great. My Files: index.php:
              require('Smarty.class.php');
              $smarty = new smarty;
              $this->template_dir = '/home/cdtipp/smarty/templates/';
              $this->compile_dir = '/home/cdtipp/smarty/templates_c/';
              $this->config_dir = '/home/cdtipp/smarty/configs/';
              $this->cache_dir = '/home/cdtipp/smarty/cache/';
              $this->caching = true;
              $smarty->display('index.tpl');
You should probabbly call these with $smarty and not $this. :)
index.tpl: {config_load file=cdtipp.conf section="home"} {include file="header.tpl"} << Just some HTML <some HTML> {include file="footer.tpl"} << Just some HTML cdtipp.conf :<<is in config_dir bodybgcolor = "#FFFFFF" tbcolor1 = "#FFFFFF" tbcolor2 = "#000000" tbcolor3 = "#767676" [home] pagetitel = "CD-TIPP.CH : HOME" pageid = "0" Does someone please help me, because i am new to smarty. But i want to use it for my application.


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