随笔分类 -  thinkphp

学习thinkphp
摘要:<?php namespace app\admin\controller; use app\BaseController; class Export extends BaseController { public function download() { $enToCn = [ 'door_num 阅读全文
posted @ 2022-03-15 16:21 生如夏花死如秋叶 阅读(1566) 评论(0) 推荐(0)
摘要:Excel表格使用A,B,C...AA,AB,AC....这种表示列号 使用php数组表示使用可以使用方法生成 function excelHead($columns) { $array = []; $n = 0; for ($i = 'A'; $i <= 'Z'; $i++) { if ($n<$ 阅读全文
posted @ 2021-10-28 17:49 生如夏花死如秋叶 阅读(468) 评论(0) 推荐(0)
摘要:$user = new User; $user->orderRaw("convert(`name` using gbk) asc")->select(); 阅读全文
posted @ 2021-07-05 18:10 生如夏花死如秋叶 阅读(423) 评论(0) 推荐(0)
摘要:创建验证器基类 app/validate/BaseValidate.php <?php namespace app\validate; use think\Validate; use app\lib\exception\BaseException; class BaseValidate extend 阅读全文
posted @ 2021-06-18 10:23 生如夏花死如秋叶 阅读(1820) 评论(0) 推荐(0)
摘要:创建自定义异常类基类 app/lib/exception/BaseException.php <?php namespace app\lib\exception; use Exception; use Throwable; class BaseException extends Exception 阅读全文
posted @ 2021-06-18 09:09 生如夏花死如秋叶 阅读(744) 评论(0) 推荐(1)
摘要:1 public static function alter($aid, $rid) 2 { 3 $incDec = GoldRule::where(['gold_rule_isdel'=>1,'gold_rule_status'=>2]) 4 ->where('gold_rule_id', $ri 阅读全文
posted @ 2019-06-03 13:56 生如夏花死如秋叶 阅读(2791) 评论(0) 推荐(0)
摘要:转自:http://www.02405.com/program/php/1099.html $where['class_id'] = ['in', '$cid_all']; $where['id'] = ['in', $all_user_id];//或这样子 $where['title'] = [' 阅读全文
posted @ 2019-01-24 16:43 生如夏花死如秋叶 阅读(3046) 评论(0) 推荐(0)
摘要:附上一段抽离出来的bootstrap的css样式,送给喜欢TP5的朋友.pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: 4px; }.pagination li { display 阅读全文
posted @ 2018-12-21 14:15 生如夏花死如秋叶 阅读(168) 评论(0) 推荐(0)
摘要:Db::table('think_user')->where(['name' => ['like','thinkphp%'],'title' => ['like','%thinkphp'],'id' => ['>',0],'status'=> 1])->select(); 阅读全文
posted @ 2018-12-13 11:08 生如夏花死如秋叶 阅读(6819) 评论(0) 推荐(0)