tp5 常用的方法

     1. db("advise")->order("id desc")->select();

     2.Db::table('think_user')->where('status=1')->order('id desc,status')->limit(5)->select();

    3.{empty name="name"}
       name为空值
      {/empty}

   4.{notempty name="name"}
      name不为空
     {/notempty}

  5.<form class="layui-form" action="{empty name='$rsEdit.uid'}{:url('main/addschool')}{else /}{:url('main/editschool')}{/empty}" method="post">

     6. {if condition="$rsEdit.img != ''"}<img src="/uploads/{$rsEdit.img}" width="50px" height="50px">{/if}

    7.
 

猜你喜欢

转载自blog.csdn.net/qq_40095911/article/details/81456907