CodeIgniter and Smarty |
[eluser]Dizaster[/eluser]
Hello, I am using both CodeIgniter 2.1 and Smarty 3.1.8 but I need to solve a problem. I am trying to include a php file into a .tpl smarty file but I can't just get it to go. I am doing it like this: Code: {include file="header.tpl" title=Smarty}
[eluser]Aken[/eluser]
What is the error? include_php is deprecated in Smarty, you should probably use something else. http://www.smarty.net/docs/en/language.f...de.php.tpl
[eluser]Dizaster[/eluser]
The error is: Code: Fatal error: Uncaught exception 'SmartyException' with message '{include_php} is deprecated, use SmartyBC class to enable' in D:\xampp\htdocs\countdown\application\libraries\smarty\libs\sysplugins\smarty_internal_compile_include_php.php:52 Stack trace: #0 D:\xampp\htdocs\countdown\application\libraries\smarty\libs\sysplugins\smarty_internal_templatecompilerbase.php(439): Smarty_Internal_Compile_Include_Php->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL) #1 D:\xampp\htdocs\countdown\application\libraries\smarty\libs\sysplugins\smarty_internal_templatecompilerbase.php(227): Smarty_Internal_TemplateCompilerBase->callTagCompiler('include_php', Array, Array) #2 D:\xampp\htdocs\countdown\application\libraries\smarty\libs\sysplugins\smarty_internal_templateparser.php(2413): Smarty_Internal_TemplateCompilerBase->compileTag('include_php', Array) #3 D:\xampp\htdocs\countdown\application\libraries\smarty\libs\sysplugins\smarty_internal_templateparser.php(3111): Smarty_Internal_Templateparser->yy_r3 in D:\xampp\htdocs\countdown\application\libraries\smarty\libs\sysplugins\smarty_internal_compile_include_php.php on line 52
[eluser]Aken[/eluser]
Read the Smarty docs, that's why I linked them to you.
[eluser]Dizaster[/eluser]
I have already read them, but it cannot include the php file from the views folder.
[eluser]Aken[/eluser]
Quote:IMPORTANT NOTICE That might be a good place to start looking. |
Welcome Guest, Not a member yet? Register Sign In |