|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
N1CK3RS0N Smarty Regular
Joined: 04 Mar 2009 Posts: 41
|
Posted: Fri Jan 03, 2014 8:30 pm Post subject: Using PHP within a .tpl |
|
|
I'm working on a tutorial PHP library and I need to execute some PHP coding but cannot get it to work.
I tried using this:
http://www.smarty.net/docsv2/en/language.function.php.tpl
But I get this error:
Quote: | Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "templates\default\variables.tpl" on line 22 "{php}" unknown tag "php"' in C:\xampp\htdocs\wikiPHP\includes\smartyphp\libs\sysplugins\smarty_internal_templatecompilerbase.php:665 Stack trace: #0 C:\xampp\htdocs\wikiPHP\includes\smartyphp\libs\sysplugins\smarty_internal_templatecompilerbase.php(451): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown tag "ph...', 22) #1 C:\xampp\htdocs\wikiPHP\includes\smartyphp\libs\sysplugins\smarty_internal_templateparser.php(2393): Smarty_Internal_TemplateCompilerBase->compileTag('php', Array) #2 C:\xampp\htdocs\wikiPHP\includes\smartyphp\libs\sysplugins\smarty_internal_templateparser.php(3101): Smarty_Internal_Templateparser->yy_r37() #3 C:\xampp\htdocs\wikiPHP\includes\smartyphp\libs\sysplugins\smarty_internal_templateparser.php(3201): Smarty_Internal_Templateparser->yy_reduce(37) #4 C:\xampp\htdocs\wikiPHP\includes\smartyphp\libs\sysplugi in C:\xampp\htdocs\wikiPHP\includes\smartyphp\libs\sysplugins\smarty_internal_templatecompilerbase.php on line 665 |
|
|
Back to top |
|
N1CK3RS0N Smarty Regular
Joined: 04 Mar 2009 Posts: 41
|
Posted: Fri Jan 03, 2014 8:36 pm Post subject: |
|
|
I read it is now depreciated in Smarty 3. Is there an alternative solution? |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|