什么是 Smarty?
为何要使用它?
用例和工作流程
语法比较
模板继承
最佳实践
速成课程
setPluginsDir() — 设置存储插件的目录
Smarty setPluginsDir(string|array plugins_dir);
示例 14.46. setPluginsDir()
<?php // set a single directory where the plugins are stored $smarty->setPluginsDir('./plugins'); // view the plugins dir chain var_dump($smarty->getPluginsDir()); // set multiple directoríes where plugins are stored $smarty->setPluginsDir(array( './plugins', './plugins_2', )); // view the plugins dir chain var_dump($smarty->getPluginsDir()); // chaining of method calls $smarty->setTemplateDir('./templates') ->setPluginsDir('./plugins') ->setCompileDir('./templates_c') ->setCacheDir('./cache'); ?>