What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
setPluginsDir() — 设置插件目录
Smarty setPluginsDir(string|array plugins_dir);
Example 14.46. setPluginsDir()
<?php // 设置单个插件目录 $smarty->setPluginsDir('./plugins'); // 查看全部插件目录 var_dump($smarty->getPluginsDir()); // 批量设置插件目录 $smarty->setPluginsDir(array( './plugins', './plugins_2', )); // 查看全部插件目录 var_dump($smarty->getPluginsDir()); // 方法连用 $smarty->setTemplateDir('./templates') ->setPluginsDir('./plugins') ->setCompileDir('./templates_c') ->setCacheDir('./cache'); ?>