标签:engines views pat func home blog com htm function
/** * 设置view */ $di->set(‘view‘, function () use ($config) { $view = new \Phalcon\Mvc\View(); $view->setViewsDir(BASE_PATH . $config->home_application->viewsDir); $view->registerEngines(array( ‘.phtml‘ => function($view, $di) use ($config) { $volt = new \Phalcon\Mvc\View\Engine\Volt($view, $di); $volt -> setOptions(array( ‘compileAlways‘ => true, ‘compiledPath‘ => BASE_PATH . $config->home_application->compileDir, )); return $volt; }, )); return $view; });
标签:engines views pat func home blog com htm function
原文地址:http://www.cnblogs.com/achengmu/p/6894054.html