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:
addPluginsDir() — 增加一个插件目录
Smarty addPluginsDir(string|array plugins_dir);
Example 14.2. addPluginsDir()
<?php // 增加一个插件目录 $smarty->addPluginsDir('./plugins_1'); // 增加多个插件目录 $smarty->setPluginsDir(array( './plugins_2', './plugins_3', )); // 显示全部的插件目录 var_dump($smarty->getPluginsDir()); // 方法连用 $smarty->setPluginsDir('./plugins') ->addPluginsDir('./plugins_1') ->addPluginsDir('./plugins_2'); ?>