当前位置:编程学习 > thinkphp >>

thinkphp视图模板里面原始php的函数传递参数方法

thinkphp模板中无法给自定义函数传多个参数


1.模板的用法

{:function(param1,param2,param3...)}

2.实例代码 放在 html模板里面

  <td>{:getzzzyk_com($id,$v['name'])}</td>


3.函数放在你的应用 common.php 文件里面

function getzzzyk_com($a,$b){
    return $a.",".$b;
}
 

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,