Is there a way to execute php in thtml files in Hero Framework?
by just placing a
<?php echo 'hello world';?>
doesn’t work in an thtml file.
is there a way to do that?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I was curious and did a bit of googling:
apparently the Hero Framework uses smarty as template engine, which is …interesting…(Excurse: smarty seems quite sophisticated these days and I know it did a good job of cache handling even a few years ago. On the other hand, it’s another layer in your Application, it’s another dialect to learn, it’s code that has to be interpreted by PHP)
smarty strongly discourages the direct use of pure php in the templates, you can read more here:
smarty documentation