gehe zur Dokumentation dieser Datei
50 public function compile($args, $compiler)
52 if (!($compiler->smarty instanceof
SmartyBC)) {
53 throw new SmartyException(
"{include_php} is deprecated, use SmartyBC class to enable");
61 $_smarty_tpl = $compiler->template;
63 eval(
'$_file = ' . $_attr[
'file'] .
';');
64 if (!isset($compiler->smarty->security_policy) && file_exists($_file)) {
67 if (isset($compiler->smarty->security_policy)) {
68 $_dir = $compiler->smarty->security_policy->trusted_dir;
70 $_dir = $compiler->smarty->trusted_dir;
73 foreach ((array) $_dir as $_script_dir) {
74 $_script_dir = rtrim($_script_dir,
'/\\') . DS;
75 if (file_exists($_script_dir . $_file)) {
76 $_filepath = $_script_dir . $_file;
82 if ($_filepath ==
false) {
83 $compiler->trigger_template_error(
"{include_php} file '{$_file}' is not readable", $compiler->lex->taglineno);
86 if (isset($compiler->smarty->security_policy)) {
87 $compiler->smarty->security_policy->isTrustedPHPDir($_filepath);
90 if (isset($_attr[
'assign'])) {
92 $_assign = $_attr[
'assign'];
95 if (isset($_attr[
'once'])) {
96 if ($_attr[
'once'] ==
'false') {
101 if (isset($_assign)) {
102 return "<?php ob_start(); include{$_once} ('{$_filepath}'); \$_smarty_tpl->assign({$_assign},ob_get_contents()); ob_end_clean();?>";
104 return "<?php include{$_once} ('{$_filepath}');?>\n";
Sie sind hier: Home » MyOOS Benutzerhandbuch » Smarty
Korrekturen, Hinweise und Ergänzungen
Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag
Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.