Get template directories
public getTemplateDir ( $index = null ) : array | string | ||
return | array | string | list of template directories, or directory of $index |
$template_dir = $smarty->getTemplateDir(); foreach ($template_dir as $dir) { echo "Directory: {$dir}\n"; }In this example, the function is called on an instance of the Smarty class, and the result is looped over to print out each directory returned by the function. This function belongs to the Smarty package library, which is an open-source template engine for PHP. It is used to separate presentation logic from application logic, making it easier to maintain and modify the user interface of a web application.
public getTemplateDir ( $index = null ) : array | string | ||
return | array | string | list of template directories, or directory of $index |