Hallo,
Op een linux webserver heb ik in de map httpdocs staan:
- map Smarty met de bestanden uit de map lib van de originele installatiemap van smarty
- de mappen templates, templates_c, cache en configs
- index.php:
In de map templates staat pagina.tpl:
De rechten van elk bestand staan zoals beschreven in http://www.smarty.net/quick_start.php
Als ik nu naar de site ga (index.php) komt er een lege pagina in plaats van "Hello, Voorbeeldnaam!".
Heeft iemand een idee hoe dat komt?
Op een linux webserver heb ik in de map httpdocs staan:
- map Smarty met de bestanden uit de map lib van de originele installatiemap van smarty
- de mappen templates, templates_c, cache en configs
- index.php:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| <?php $path = '/var/www/vhosts/domein/httpdocs/'; // put full path to Smarty.class.php require($path.'Smarty/Smarty.class.php'); $smarty = new Smarty(); $smarty->template_dir = $path.'templates'; $smarty->compile_dir = $path.'templates_c'; $smarty->cache_dir = $path.'cache'; $smarty->config_dir = $path.'configs'; $smarty->assign(array('name' => 'Voorbeeldnaam')); $smarty->fetch('pagina.tpl'); ?> |
In de map templates staat pagina.tpl:
code:
1
2
3
4
5
| <html> <body> Hello, {$name}! </body> </html> |
De rechten van elk bestand staan zoals beschreven in http://www.smarty.net/quick_start.php
Als ik nu naar de site ga (index.php) komt er een lege pagina in plaats van "Hello, Voorbeeldnaam!".
Heeft iemand een idee hoe dat komt?