会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Abner3721
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
12
下一页
2021年1月30日
百万级数据导出
摘要: 数据导出的瓶颈在于数据查询,数据的条数查询大量消耗内存,导致服务宕机,所以按照主键id来分批查询数据 /** * 百万级数据导出 */ public function excelout(){ //不限制执行时间,以防超时 set_time_limit(0); //文件名 $xlsName = ico
阅读全文
posted @ 2021-01-30 09:38 Abner3721
阅读(159)
评论(0)
推荐(0)
2021年1月10日
无限级分类
摘要: /** * Explanation:无限级分类 * Author: Abner * Time: 2021/1/10 17:33 * @param $data * @return array */ public static function getTree($data){ $items = [];
阅读全文
posted @ 2021-01-10 17:34 Abner3721
阅读(71)
评论(0)
推荐(0)
2020年12月28日
thinkphp批量生成小程序二维码并且打包下载
摘要: public function download($city){ if(!empty($city)){ $where = [ 'chengshi' => $city, 'mobile' => ['<>',''], ]; }else{ $where = [ 'mobile' => ['<>',''],
阅读全文
posted @ 2020-12-28 10:11 Abner3721
阅读(770)
评论(0)
推荐(0)
2020年12月16日
Composer 拉取thinkphp的代码出问你
摘要: [Composer\Downloader\TransportException] curl error 7 while downloading https://packagist.phpcomposer.com/p2/topthink/think-view.json: Failed to conne
阅读全文
posted @ 2020-12-16 23:35 Abner3721
阅读(390)
评论(0)
推荐(0)
2020年11月25日
excel导出百万的数据
摘要: <?php namespace app\index\controller; class Index { public function index(){ $this->excelout(); } /** * 百万级数据导出 */ public function excelout(){ //不限制执行
阅读全文
posted @ 2020-11-25 20:16 Abner3721
阅读(187)
评论(0)
推荐(0)
2020年11月23日
ajax提交表单
摘要: <form id="parkSys_bind_edit_form" name="parkSys_bind_edit_form" method="POST" action="{:url('card/savepost')}"> <ul class="addinput"> <li><span>绑定方式:<
阅读全文
posted @ 2020-11-23 13:35 Abner3721
阅读(84)
评论(0)
推荐(0)
2020年11月19日
mysql自动生成数据
摘要: # 准备 #1. 准备表 create table s1( id int, name varchar(20), gender char(6), email varchar(50), first_name char(10), last_name char(10) ); #2. 创建存储过程,实现批量插
阅读全文
posted @ 2020-11-19 22:38 Abner3721
阅读(502)
评论(0)
推荐(0)
2020年11月12日
发起请求
摘要: <?php namespace app\common\fun; class HttpClient { /** * 发起请求 * @param string $url 请求地址 * @param string $param 请求数据包 * @return string 请求返回数据 */ public
阅读全文
posted @ 2020-11-12 15:40 Abner3721
阅读(104)
评论(0)
推荐(1)
2020年10月27日
thinkphp导出excel表格
摘要: /** * 数组转xls格式的excel文件 * @param array $data 需要生成excel文件的数组 * @param string $filename 生成的excel文件名 * 示例数据: $data = array( array(NULL, 2010, 2011, 2012),
阅读全文
posted @ 2020-10-27 19:54 Abner3721
阅读(205)
评论(0)
推荐(0)
juqery全选反选
摘要: <!DOCTYPE html> <html> <head> <title></title> <script src="https://cdn.staticfile.org/jquery/3.1.1/jquery.min.js"></script> </head> <body> <input type
阅读全文
posted @ 2020-10-27 15:53 Abner3721
阅读(56)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
12
下一页
公告