©
本文档使用
php.cn手册 发布
This tells Smarty how to handle PHP code embedded in the
templates. There are four possible settings, default being
SMARTY_PHP_PASSTHRU. Note that this does NOT affect php code
within {php}{/php}
tags in the template.
该变量告诉Smarty怎样处理嵌入到模版中的php代码.有四种可能的设置,默认为SMARTY_PHP_PASSTHRU.注意:改变量的设置不会影响模板里面{php}{/php}标记中的php代码.
SMARTY_PHP_PASSTHRU - Smarty echos tags as-is.Smarty
原样输出标记.
SMARTY_PHP_QUOTE - Smarty quotes the tags as
html entities.Smarty
作为html实体引用标记
SMARTY_PHP_REMOVE - Smarty removes the tags from
the templates.Smarty
从模板中移出标记.
SMARTY_PHP_ALLOW - Smarty will execute the tags
as PHP code.Smarty
将作为php代码执行标记.
NOTE: Embedding PHP code into templates is highly discouraged.
Use custom functions or
modifiers instead.
极度不赞成将php代码嵌入到模板中.