AW: Re: Pathname to debug.tpl

From: Date: Mon, 31 Dec 2001 13:46:14 +0000
Subject: AW: Re: Pathname to debug.tpl
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2449@lists.php.net to get a copy of this message
Yes, it works from the local template dir. But this is not what I want. I'm having more than one Smarty-version on my testmachine to be able to test on new versions and publish only if the tests are ok. So I install each smarty distribution in a separate subdirectory. Then I change the SMARTY_DIR in my script to point to the current smarty version. I made the path to debug.tpl depending on SMARTY_DIR by: define("SMARTY_DIR","./Smarty/Smarty-1.5.2"); require_once SMARTY_DIR."Smarty.class.php"; $smarty = new Smarty(); $smarty->debug_tpl = "SMARTY_DIR/templates/debug.tpl"; $smarty->debugging = true; Then I get on the last line of my page: Warning: Smarty error: unable to read template resource: "./Smarty/Smarty-1.5.2/templates/debug.tpl" in c:\inetpub\wwwroot\Smarty\Smarty-1.5.2\Smarty.class.php on line 1516 It only works if I set the debug_tpl to: /inetpub/wwwroot/Smarty/Smarty-1.5.2/templates/debug.tpl Werner Schweizer > -----Ursprungliche Nachricht----- > Von: Monte Ohrt [mailto:monte@ispi.net] > Gesendet: Montag, 31. Dezember 2001 05:37 > An: smarty@lists.ispi.net > Cc: smarty@lists.ispi.net > Betreff: [smarty] Re: Pathname to debug.tpl > > > Hmm, it should work with a relative path. If you use "debug.tpl" > as the path, > it should look for it in the template_dir. > > Werner Schweizer wrote: > > > Why is only an absolute path-name accepted for the $smarty->debug_tpl ? > > I would like to be able to use a relative path. > > > > My testsystem at home is a Windows PC. At the provider site > > there is a LINUX-system. > > The absolute path on Windows has to begin at the root c:\... > (without c:) > > but on the provider site it begins at the virtual root of the URL. > > > > A relative name could be the same on both systems. > > > > Werner Schweizer > > > > --- > > You are currently subscribed to smarty as: monte@ispi.net > > To unsubscribe send a blank email to $subst('Email.Unsub') > > Visit Smarty's homepage at > > http://www.phpinsider.com/php/code/Smarty/ > > > --- > You are currently subscribed to smarty as: W.Schweizer@SwissOnline.ch > To unsubscribe send a blank email to $subst('Email.Unsub') > Visit Smarty's homepage at > http://www.phpinsider.com/php/code/Smarty/ >

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