Re: cannot get smarty working

From: Date: Mon, 30 Sep 2002 15:55:01 +0000
Subject: Re: cannot get smarty working
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6049@lists.php.net to get a copy of this message
Try this: <?php define('SMARTY_DIR','includes/'); require(SMARTY_DIR.'Smarty.class.php'); $smarty = new Smarty; $smarty->template_dir = 'templates/'; $smarty->compile_dir = 'templates_c/'; $smarty->config_dir = 'configs/'; $smarty->cache_dir = 'cache/'; $smarty->assign('name','Ned'); $smarty->display('index.tpl'); ?> "Will" <willa2@hotmail.com> wrote in message news:OE58McgxpBFkV8QhBfe0000407c@hotmail.com... I just tried to get smarty working but I can't get it to. I'm running Apache on a windows 98 local machine (For testing websites) and I tried installing smarty using the example system and all I got was "Cant read resource index.tpl". This is the structure. Document Root |--guestbook |--includes --Config_File.class.php --debug.tpl --Smarty.class.php --Smarty_Compiler.class.php |--cache |--configs |--templates_c |--templates --index.tpl --index.php Contents of index.tpl: <HTML> <TITLE>Hello</TITLE> <BODY> Hello, {$Name}! </BODY> </HTML> Contents of index.php: <?php define('SMARTY_DIR','includes/'); require(SMARTY_DIR.'Smarty.class.php'); $smarty = new Smarty; $smarty->assign('name','Ned'); $smarty->display('index.tpl'); ?> What am I doing wrong?????? Willa

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