Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
461 views
in Technique[技术] by (71.8m points)

Thinkphp 3.1.2模板怎么调用带参数的自定义函数?

Thinkphp 3.1.2模板怎么调用带参数的自定义函数?
我的需求是查询客户的最后一条日志,条件是根据当前的customer_id,但是我这样写调用不出来{:getLastRecord($vo['curstomer_id'])}


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

写法有很多种 你上面的写法没什么问题
还有一种就是用<php>echo getLastRecord($vo['curstomer_id']);</php>
这样

如果你的方法写的没问题就没问题


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...