Hey,
Ik probeer Smarty te installeren. Ik heb vijf directories aangemaakt: templates, templates_c, cache en configs. Nu heb ik de smarty Library in de directory libs gedaan. (alle vijf in dezelfde directory). Ik dacht dat ik nu klaar was. Maar toen ik het teste kreeg ik deze foutmelding in het testbestandje smarty.php:
Fatal error: Cannot instantiate non-existent class: smarty in /home/gebruiker/domains/domein.nl/public_html/test/smarty.php on line 7
Zo ziet het bestandje eruit:
<?php
$path = '/home/gebruiker/domains/domein.nl/public_html/test/';
// put full path to Smarty.class.php
require($path . 'libs/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('name', 'Ned');
$smarty->display('test.tpl');
// test.tpl zit in templates/test.tpl
?>
Ik vind het vreemd dat hij het bestand Smarty.class.php wel opent maar de class erin niet vindt. Weet iemand wat hieraan gedaan kan worden.
Alvast bedankt,
Edwin
1.191 views