标题非常自我解释。这是我希望在没有{php} {/ php}标签的Smarty模板中调用的函数示例:
form_input(array('name' => 'username', 'id' => 'username', 'value' => set_value('username')))
我得到的聪明错误是
Unexpected " => ", expected one of: "","" , ")"
答案 0 :(得分:0)
如果这是您在Smarty中使用的内容,请记住您需要对数组使用括号语法(即{form_input(['name' => 'username', 'id' => 'username', 'value' => {set_value('username')}])}
,或更接近于此的内容)