RE: [SMARTY-DEV] Quick Install

From: Date: Wed, 13 Apr 2005 23:34:55 +0000
Subject: RE: [SMARTY-DEV] Quick Install
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2698@lists.php.net to get a copy of this message
Hi. Templates should be relative to template_dir; in your case: > $smarty->template_dir = 'd:/smarty/project/smarty_templates'; So if you put your templates in that folder (eg: d:/smarty/project/smarty_template/index.tpl) then you could simply use: $smarty->display('index.tpl'); xo boots --- jmartinez@controlaircorp.com wrote: > Ok I got this working on: > Windows 2000 Server > IIS 5 > PHP 5 > MySQL 4.1.11 > Smarty 2.6.9 > > but the pathing is screwy. It works but I don't like it. In the .php > when I direct it to the template I have to put the full path: > $smarty->display('d:/inetpub/wwwroot/index.tpl'); > > I don't mind specifying the full path for the Smarty folders (cache, > templates etc.) but why am I forced to specify the full path for the > template call?? I've noticed that the pathing gets assigned to the > php.ini's include path once I call the Smarty class. grrr... > > > Here is my setup: > > www root: d:/inetpub/wwwroot > Smarty: d:/smarty/libs > Smarty working folders: > d:/smarty/project/smarty_cache > d:/smarty/project/smarty_config > d:/smarty/project/smarty_templates > d:/smarty/project/smarty_templates_c > > php.ini: include_path = ".;d:\smarty\libs" > > index.php: > <?php > > // load Smarty library > require('Smarty.class.php'); > > $smarty = new Smarty; > > $smarty->template_dir = 'd:/smarty/project/smarty_templates'; > $smarty->compile_dir = 'd:/smarty/project/smarty_templates_c'; > $smarty->config_dir = 'd:/smarty/project/smarty_config'; > $smarty->cache_dir = 'd:/smarty/project/smarty_cache'; > > $smarty->assign('name','fish boy!'); > > $smarty->display('d:/inetpub/wwwroot/index.tpl'); > ?> > > index.tpl: > <html> > <body> > Hello, {$name}! > </body> > </html> > > -----Original Message----- > From: John Martinez > Sent: Wednesday, April 13, 2005 9:13 AM > To: smarty-dev@lists.php.net > Subject: [SMARTY-DEV] Quick Install > > > I just went through the quick install. It is so wrong for Windows > users it's not even funny. I recommend a second section be added with > this info. I'll send something once I get a moment. > > John > > -- > Smarty Development Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > Smarty Development Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.smarty.dev (#2698) next »