Files
smarty/docs/en/programmers/api-variables/variable-php-handling.xml

61 lines
1.8 KiB
XML
Raw Normal View History

2004-04-13 11:47:32 +00:00
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ -->
<sect1 id="variable.php.handling">
<title>$php_handling</title>
<para>
This tells Smarty how to handle PHP code embedded in the
2006-09-27 06:28:21 +00:00
templates. There are four possible settings, the default being
<constant>SMARTY_PHP_PASSTHRU</constant>. Note that this does NOT affect
php code within <link linkend="language.function.php">
<varname>{php}{/php}</varname></link> tags in the template.
</para>
2006-09-27 06:28:21 +00:00
2004-04-13 11:47:32 +00:00
<itemizedlist>
2006-09-27 06:28:21 +00:00
<listitem><para>
<constant>SMARTY_PHP_PASSTHRU</constant> - Smarty echos tags as-is.
</para></listitem>
<listitem><para>
<constant>SMARTY_PHP_QUOTE</constant> - Smarty quotes the tags as
html entities.
</para></listitem>
<listitem><para>
<constant>SMARTY_PHP_REMOVE</constant> - Smarty removes the tags from
2004-04-13 11:47:32 +00:00
the templates.</para></listitem>
2006-09-27 06:28:21 +00:00
<listitem><para>
<constant>SMARTY_PHP_ALLOW</constant> - Smarty will execute the tags
2004-04-13 11:47:32 +00:00
as PHP code.</para></listitem>
</itemizedlist>
2006-09-27 06:28:21 +00:00
<note>
2004-04-18 17:23:26 +00:00
<para>
Embedding PHP code into templates is highly discouraged.
Use <link linkend="plugins.functions">custom functions</link> or
<link linkend="plugins.modifiers">modifiers</link> instead.
2004-04-18 17:23:26 +00:00
</para>
</note>
2004-04-13 11:47:32 +00:00
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
2004-04-18 17:23:26 +00:00
-->