![](/img/trans.png)
[英]I want to send an array from php file to .tpl file in smarty
[英]I want to write PHP code for a Smarty .tpl file
我想为Smarty .tpl文件编写PHP代码。 但这给了我以下错误:
没捉到-> Smarty编译器:第185行“ {php}”未知标签“ php” <-中的模板“ ./templates/register.tpl”中的语法错误<-抛出/ opt / lampp / htdocs / Smarty / libs / sysplugins /smarty_internal_templatecompilerbase.php在第185行
当我使用Google时,我意识到它已被弃用,不建议使用。 我现在应该怎么办? 我想显示带有安全性问题的下拉菜单。
不知道Smary是什么或如何使用,但我从文档中得到的是{php}已过时。
回传{$foo}
tpl文件中的$ foo变量
您应该在smarty_securoty.php中进行更改,并进行
public $ allow_php_tag = false; 至
public $ allow_php_tag = true;
它允许.tpl文件中的PHP代码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.