$syscode = M('SystemCode'); // 实例化User对象 $count = $syscode->where('code_state=0')->count();// 查询满足要求的总记录数 $list = $syscode->where('code_state=0')->ord... ...
分类:
其他好文 时间:
2019-01-05 23:59:31
阅读次数:
296
在《Think in java》中有这样一句话:复用代码是Java众多引人注目的功能之一。但要想成为极具革命性的语言,仅仅能够复制代码并对加以改变是不够的,它还必须能够做更多的事情。在这句话中最引人注目的是“复用代码”,尽可能的复用代码使我们程序员一直在追求的,现在我来介绍一种复用代码的方式,也是j ...
分类:
编程语言 时间:
2019-01-05 14:15:50
阅读次数:
205
public function _initialize() { if (!Session::has('user', 'think')) { $this->error('非法登录', 'Login/index'); } $this->get_date(); } public function get_ ...
分类:
其他好文 时间:
2019-01-05 12:17:27
阅读次数:
144
在thinkphp中,url传参合asp.net中原理类似,下面就单个参数和多个参数传递方式进行一个简单讲解 1.传单个参数 单个参数这种比较简单,例如 想像edit操作里面传递一个id值,如下写法__URL__/edit/id/1 1 http://localhost/index.php/user ...
分类:
Web程序 时间:
2019-01-04 18:43:50
阅读次数:
222
linux下, 使用thinkphp的模板标签,如 eq, gt, volist defined, present , empty等 标签时, 报错: used undefined function \Think\Template\simplexml_load_string(), 原因是 没有安装 ...
分类:
Web程序 时间:
2019-01-03 16:35:43
阅读次数:
1085
# 处理ES6语法
使用Babel > Babel是一个用于将ECMAScript 2015+ 代码转换为新旧浏览器或其他环境支持的JavaScript向下兼容版本代码的工具链。
> > Babel主要可以做:
> > - 语法翻译
> - 拓展(Polyfill)您的目标环境不支持的特性
> - ... ...
分类:
其他好文 时间:
2019-01-03 00:40:18
阅读次数:
279
$sql = " (select id,'1'as type ,content,photo,issuetime as t from experience where userid = {$userid}) UNION ALL (select id,'2'as type, name as conten ...
分类:
Web程序 时间:
2019-01-02 15:09:45
阅读次数:
234
here, we're just creating a class Square inherited from class Rect. compiler calls only Square.Print() now we would really like to see what is polymor ...
分类:
编程语言 时间:
2018-12-29 13:36:15
阅读次数:
213
1.默认异常处理在调试模式下,系统默认展示的错误页面:请输入图片描述 异常处理接管 1.修改config.php 'app_debug' => false,2.在配置文件里添加如下代码 // 异常处理handle类 留空使用 \think\exception\Handle'exception_han ...
分类:
Web程序 时间:
2018-12-27 15:19:42
阅读次数:
297
Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right pointers as synonymous to the previous and next pointers i ...
分类:
其他好文 时间:
2018-12-27 10:23:29
阅读次数:
178