Re: [SMARTY] unable to read resource

From: Date: Wed, 23 Feb 2005 07:10:12 +0000
Subject: Re: [SMARTY] unable to read resource
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12255@lists.php.net to get a copy of this message
try this $smarty->template_dir = '/var/www/smartytest/templates/'; or $smarty->display('/index.tpl'); On Tue, 22 Feb 2005 19:56:55 +0100, Tobias Daur <daur@gmx.de> wrote: > Hi, > > I'm stuck - hope, someone can help me. > I use smarty now for several projects on several servers, it's working > fine everywhere. Since upgrading my dev laptop to debian sarge (which > means: changing php to 4.3.10, apache to 1.3.3), Smarty doesn't find the > templates anymore. > > Smarty: 2.6.6 > > I went down to this peace of code: > > <?php > require('libs/Smarty.class.php'); > $smarty = new Smarty; > $smarty->template_dir = '/var/www/smartytest/templates'; > $smarty->debugging = true; > $smarty->debug_tpl = 'debug.tpl'; > $smarty->display('index.tpl'); > ?> > > I get: > Warning: Smarty error: unable to read resource: "index.tpl" > in /var/www/smartytest/libs/Smarty.class.php on line 1088 > > The dir and filename is correct, rights are correct, php safe_mode is > off. > > It however works with > > $smarty->display("/var/www/smartytest/templates/index.tpl"); > and also with > $smarty->display($smarty->template_dir."/index.tpl"); > > Why doesn't it work here with > $smarty->display('index.tpl'); > but works on every other server i tried with this sample? > > thanks > > Tobias > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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