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.
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章