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

getConfigDir() — 取得配置文件目录

说明

string|array getConfigDir(string key);

Example 14.25. getConfigDir()


<?php

// 设置一些配置目录
$smarty->setConfigDir(array(
    'one' => './config',
    'two' => './config_2',
    'three' => './config_3',
));

// 取得全部的配置文件目录
$config_dir = $smarty->getConfigDir();
var_dump($config_dir); // 数组

// 取得特定的配置文件目录
$config_dir = $smarty->getConfigDir('one');
var_dump($config_dir); // 字符串

?>

   

参见 setConfigDir(), addConfigDir()$config_dir.