|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
TheDeath Smarty n00b
Joined: 06 Aug 2003 Posts: 2 Location: Austria
|
Posted: Wed Aug 06, 2003 8:36 am Post subject: fatal error |
|
|
i've installed smarty on apache/WinXP
my webroot is:
c:\xampp\htdocs\
i've installed smarty:
\htdocs\smarty\
my documents are in;
\htdocs\smarty\hp\
so, now i tried to test it.. but it doesn't work!
Error:
Code: | Fatal error: Smarty error: [in test.tpl line 2]: [plugin] unknown tag - 'name' (Smarty.class.php, line 2543) in C:\xampp\php\pear\Smarty.class.php on line 2652
|
test.tpl:
Code: | {* Smarty *}
hello, {name} |
test.php
Code: |
<?
// Smarty laden
require('Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = '/xampp/htdocs/smarty/hp/templates/';
$smarty->compile_dir = '/xampp/htdocs/smarty/hp/templates_c/';
$smarty->config_dir = '/xampp/htdocs/smarty/hp/configs/';
$smarty->cache_dir = '/xampp/htdocs/smarty/hp/cache/';
$smarty->assign('name','Ned');
$smarty->display('test.tpl');
?>
|
so, why it doesn't work?
thx TheDeath _________________
|
|
Back to top |
|
andre Smarty Pro
Joined: 23 Apr 2003 Posts: 164 Location: Karlsruhe, Germany
|
Posted: Wed Aug 06, 2003 8:43 am Post subject: |
|
|
"name" is a variable and so you need to write in your template. Notice the $ (dollar) sign!
{name} is a function call. |
|
Back to top |
|
TheDeath Smarty n00b
Joined: 06 Aug 2003 Posts: 2 Location: Austria
|
Posted: Wed Aug 06, 2003 8:47 am Post subject: |
|
|
man.... i'm so stupid!!!!!!!!!!!!! thx a lot now it works _________________
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|