Templates from any directory

PHP Smarty

Smarty - the compiling PHP template engine
Prev 来源:PHP中文社区 Next

Templates from any directory

Table of Contents
Windows Filepaths
// from PHP script
$smarty->display("file:/export/templates/index.tpl");
$smarty->display("file:/path/to/my/templates/menu.tpl");

{* from within Smarty template *}
{include file="file:/usr/local/share/templates/navigation.tpl"}

Windows Filepaths

// from PHP script
$smarty->display("file:C:/export/templates/index.tpl");
$smarty->display("file:F:/path/to/my/templates/menu.tpl");

{* from within Smarty template *}
{include file="file:D:/usr/local/share/templates/navigation.tpl"}

Prev 来源:PHP中文社区 Home Next
Templates from $template_dir Up Templates from other sources