zoukankan      html  css  js  c++  java
  • TP5和TP3.2的使用区别

    模板标签不一样:

    TP5 可在配置文件中自行定义自己喜欢的标签

    TP5  使用双标签 如:{foreach} {/foreach}

        TP3 : <>

        TP5 :{}

    调用数据表方式:

        M('User')->where(['name'=>'thinkphp'])->find();(3.2)

        db('User')->where('name'=>'thinkphp')->find();(5.0)

        M->db

    实例化模型的方式:

        D('User')->where(['name'=>'thinkphp'])->find();

        model('User')->where(['name'=>'thinkphp'])->find();

    或者

        $UserModel =new User();

        $UserModel->where(['name'=>'thinkphp'])->find();

        D->model

    U方法:

        U->url

        IS_Get->Request::instance()->isGet();

        IS_POST->Request::instance()->isPost();

    I方法

        I->input(代替);

    C方法

        C->config()

    具体查看助手函数:

    https://www.kancloud.cn/manual/thinkphp5/144731

     

  • 相关阅读:
    expandafter
    又回到了kde
    朗读软件
    tex bookmarks
    vim命令执行时间
    vim,tex的编译
    utorrent
    火狐的扩展
    linux 无线指示灯闪
    tex溢出报警
  • 原文地址:https://www.cnblogs.com/xinxinmifan/p/7156221.html
Copyright © 2011-2022 走看看