composer.json:Smarty_Internal_TemplateCompilerBase pas trouvé
{
"require": {
"smarty/smarty": "v3.1.17"
}
}
index.php:
define('SMARTY_SPL_AUTOLOAD', 1); // now smarty should use its own autoloader
require_once __DIR__ . "/vendor/autoload.php";
function my_classes_loader($class) {
$path = "{$class}.class.php";
if (file_exists($path)) {
include_once $path;
return true;
}
return false;
}
spl_autoload_register('my_classes_loader');
$smarty = new Smarty();
$smarty->setCompileDir("templates_c");
$smarty->display('main.html');
exit();
Si je l'ouvre dans le navigateur je reçois
Fatal error: Class 'Smarty_Internal_TemplateCompilerBase' not found in //smarty-example/vendor/smarty/smarty/distribution/libs/sysplugins/smarty_internal_smartytemplatecompiler.php on line XX
Le fichier est là. Et il a du contenu. Et il est accessible/lisible pour PHP etc.
Qu'est-ce que je fais mal? Que manque-t-il?