Re: [SMARTY] Smarty Win Config
| From: | messju mohr | Date: | Thu, 03 Jul 2003 09:00:35 +0000 |
| Subject: | Re: [SMARTY] Smarty Win Config | ||
| References: | 1 | Groups: | php.smarty.dev php.smarty.general |
| Request: | Send a blank email to php-smarty-dev+get-1713@lists.php.net to get a copy of this message | ||
On Wed, Jul 02, 2003 at 11:33:35PM -0700, Balaji Nallathambi wrote:
> Iam yet not able to confug Smarty on windows
> Iam typing the problem Again.
>
> Pls any one help me
>
> Iam using an windows 98 machine with Apache,php and mySql (Iam using
> EasyPHP)
>
> The Intial two codes are like this
> this is
> index.php
>
> <?php
> define('SMARTY_DIR','D:\\Smarty\\libs\\');
> require(SMARTY_DIR.'Smarty.class.php');
> $smarty = new Smarty;
> $smarty->template_dir = 'D:\\Smarty\\templates\\';
> $smarty->assign(?name?,?Ned?);
> $smarty->display(?index.tpl?);
> ?>
maybe you have to set $smarty->compile_dir to
'D:\\Smarty\\templates_c' and ensure that D:\\Smarty\\templates_c
exists and is writable.
also: only SMARTY_DIR need a trailing \ all properites of $smarty
(plugins_dir, template_dir, compile_dir etc.) don't need a trailing
slash. you may get double \ inside your paths if you have a trailing \
in $smarty->template_dir. i don't think a double-backslash in a
file-path is problematic, it's just a bit unclean.
> index.tpl is as below
>
> <html>
> <head>
> <title>Untitled Document</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> </head>
> <body>
> {* smarty *}
> Hello, {$name}!
> </body>
> </html>
>
> Iam getting the following error when iam trying to execute index.php in
> my apache webserver
> The error is
>
> Warning: Smarty error: unable to read template resource:
> "?indextpl?" in D:\Smarty\libs\Smarty.class.php on line 1042
> How to Solve the Problem.?
> Advance Thanks
> Bye
> Balaji.N
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!