zoukankan      html  css  js  c++  java
  • tp3.2基础

    地址/项目名/入口文件/模块/控制器/方法
    类名.class.php

    命名空间 namespace Homecontroller(目录);
    use ThinkController;(引入Controller类*必须*) 
    use ThinkDb;

    class IndexController extends Controller(继承类)
    {
    IS_POST IS_GET IS_AJAX 判断接收方式

    I('get.')//input 可以理解为表单 获取变量
    C('name',123);//config 读取 设置配置文件
    U();查找地址
    $obj = M('students');可以理解为选择表
    D();实例化表名,强定性

    M('students')->find();

    $obj->select(); //所有的
    $obj->filed('id,name')->where()->find();//只查找第一条

    $obj->create(I('post.'));//创建数据对象
    $obj->where('id= xxx')->save(I('post.'));

    $obj->add(I('post.'));

    $obj->where()->delete();
    $this->success();
    $this->error();
    $this->redirect();
    $this->assign('arr',$list);//映射数据的
    $this->dispaly();//映射页面
    }

    {$arr}
    volist id="" name=""

    <volist id="" name=""></volist>

    <if condition="id eq 1">

    </if>

  • 相关阅读:
    React.memo()使用教程
    React组件什么时候render
    redux-thunk使用教程
    Redux数据持久化
    Mac 中安装 nvm: 切换Node 不同版本
    上传文件类型选择
    Python获取软件安装列表
    Java读取text文件
    负载均衡
    远程调用
  • 原文地址:https://www.cnblogs.com/sw-3/p/9869024.html
Copyright © 2011-2022 走看看