[prev in list] [next in list] [prev in thread] [next in thread]
List: smarty-general
Subject: [smarty] AW: Re: Pathname to debug.tpl
From: "Werner Schweizer" <W.Schweizer () SwissOnline ! ch>
Date: 2001-12-31 13:46:14
[Download RAW message or body]
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 leave-smarty-700385W@lists.ispi.net
> > 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 leave-smarty-700385W@lists.ispi.net
> Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/
>
---
You are currently subscribed to smarty as: smarty@progressive-comp.com
To unsubscribe send a blank email to leave-smarty-700385W@lists.ispi.net
Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic