Get Smarty

Donate

Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

Name

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');

?>

   

参见 getPluginsDir(), setPluginsDir()$plugins_dir.

Comments
No comments for this page.

Advertisement