2018-06-15 thinkPHP 视图 模板 运算
作者:
土豆丝炒洋芋丝 | 来源:发表于
2018-06-15 16:15 被阅读0次<html>
{$vo['col_times']+120} //数值加法运算
{$user['score']*$user['level']} //乘法
{$user['score']+myFun($user['level'])} //
{:time()} //获取当前时间
{$time|date="Y-m-d H:i",###} //将时间戳转为时期格式
{:date('Y-m-d H:i:s',$time)} //将时间戳转为时期格式
{$Think.session.user['userName']} //session 取值
{$Think.session.user->userName} //session 取值
<form action="/subject/hremeftx.html" method="post" ///subject/hremeftx.html 表示表单提交到当前控制器
// 大小比较
<if condition="$vo['col_times']+120 gt time()">
<span class="hd_tag_jh">在线中</span>
<elseif condition="$vo['col_times']+120 lt time()"/>
<span class="hd_tag_js">不在线</span>
</if>
</html>
本文标题:2018-06-15 thinkPHP 视图 模板 运算
本文链接:https://www.haomeiwen.com/subject/hremeftx.html
网友评论