![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
thinkphp
搬码大神
热爱PHP,主攻PHP。
展开
-
php按年月分组数据(例如账单)
/** * 按年月分组数据(例如账单) * @param $arr_data 分组的数组 * @param string $time_field 时间分组字段 * @return array */function monthlyGrouping($arr_data,$time_field = 'created_at'){ if (empty($time_field)) { return $arr_data; } //按月份分组 $arr_mon.转载 2021-04-15 17:36:10 · 722 阅读 · 0 评论 -
thinkphp 生成pdf文件进行打印方法
1、首先 项目根目录运行 composer require tecnickcom/tcpdf 生成tcpdf库。 Composer中国镜像比较慢,这里推荐使用阿里云镜像原创 2020-07-16 13:58:02 · 1598 阅读 · 2 评论 -
thinkphp用户签到积分逻辑代码
namespace app\index\controller;use think\Controller;use think\facade\Session;class SignIn extends Controller{ public function signIn() { // 1.验证是否登录 if(!Session::has('student_id')){ show([],0,'请先登录'); } .转载 2020-06-11 11:22:21 · 786 阅读 · 0 评论