What best practices should be followed when including PHP files in Smarty templates to avoid conflicts?

When including PHP files in Smarty templates, it is important to avoid conflicts by ensuring that the PHP code is properly encapsulated within PHP tags <?php ?>. This will prevent any PHP code from being interpreted as Smarty template code. Additionally, it is recommended to use the {literal} Smarty tag to wrap any PHP code within the template to ensure it is not parsed by Smarty.

&lt;?php
// Include PHP file within Smarty template
require_once(&#039;file.php&#039;);

// Encapsulate PHP code within PHP tags
?&gt;
{literal}
&lt;?php
// Your PHP code here
?&gt;
{/literal}