标签:ica 多对多 首字母 print nbsp pre his success color
入口文件:index.php
目录结构:核心,Thinkphp
公共资源,public
应用目录,application
命名: 类: 首字母大写类名
controller.class.php
类同名
命名空间: Home/application/Admin/application
配置文件:config.php
动态配置: C(‘key’,‘value‘);
视图:视图下的index文件夹下的xxx.html
I
//C读取配置U设置地址
C(‘URL_HTML_SUFFIX‘,‘.html‘); $url = U(‘Home/Index/index‘,[‘id‘=>2]); $this->success(‘ojbk‘,$url,10); echo $url; $this->display();
//一对一联表
$arr = $obj ->field(‘students.id,name,class_name‘)->join(‘class on class.student_id=students.id‘) // ->select(); // print_r($arr);
//多对多联表
$obj = M(‘class_student‘); $arr = $obj -> field(‘students.id,students.name,ymt_class.class_name‘) -> join(‘ymt_class on class_student.class_id=ymt_class.id‘) -> join(‘students on class_student.student_id=students.id‘) // -> where([‘ymt_class.class_name‘=>1803]) ->select(); print_r($arr);
标签:ica 多对多 首字母 print nbsp pre his success color
原文地址:https://www.cnblogs.com/sw-3/p/9838380.html