【发布时间】:2021-07-04 03:38:33
【问题描述】:
FlightPHP 文档概述了如何将模板引擎切换到 Smarty,但我该如何切换到 Plates?我已经通过 composer 添加了 Plates 并自动加载了它。
来自自定义视图部分:https://flightphp.com/learn#views
<?
Flight::register('view', 'Smarty', array(), function($smarty){
$smarty->template_dir = './templates/';
$smarty->compile_dir = './templates_c/';
$smarty->config_dir = './config/';
$smarty->cache_dir = './cache/';
});
?>
如何改为从此处添加 Plates 引擎? https://platesphp.com/engine/overview/
【问题讨论】: