随笔分类 - thinkphp
学习thinkphp
摘要:<?php namespace app\admin\controller; use app\BaseController; class Export extends BaseController { public function download() { $enToCn = [ 'door_num
阅读全文
摘要:Excel表格使用A,B,C...AA,AB,AC....这种表示列号 使用php数组表示使用可以使用方法生成 function excelHead($columns) { $array = []; $n = 0; for ($i = 'A'; $i <= 'Z'; $i++) { if ($n<$
阅读全文
摘要:$user = new User; $user->orderRaw("convert(`name` using gbk) asc")->select();
阅读全文
摘要:创建验证器基类 app/validate/BaseValidate.php <?php namespace app\validate; use think\Validate; use app\lib\exception\BaseException; class BaseValidate extend
阅读全文
摘要:创建自定义异常类基类 app/lib/exception/BaseException.php <?php namespace app\lib\exception; use Exception; use Throwable; class BaseException extends Exception
阅读全文
摘要: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
阅读全文
摘要:转自:http://www.02405.com/program/php/1099.html $where['class_id'] = ['in', '$cid_all']; $where['id'] = ['in', $all_user_id];//或这样子 $where['title'] = ['
阅读全文
摘要:附上一段抽离出来的bootstrap的css样式,送给喜欢TP5的朋友.pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: 4px; }.pagination li { display
阅读全文
摘要:Db::table('think_user')->where(['name' => ['like','thinkphp%'],'title' => ['like','%thinkphp'],'id' => ['>',0],'status'=> 1])->select();
阅读全文

浙公网安备 33010602011771号