上一页 1 2 3 4 5 6 7 8 ··· 12 下一页
摘要: 数据导出的瓶颈在于数据查询,数据的条数查询大量消耗内存,导致服务宕机,所以按照主键id来分批查询数据 /** * 百万级数据导出 */ public function excelout(){ //不限制执行时间,以防超时 set_time_limit(0); //文件名 $xlsName = ico 阅读全文
posted @ 2021-01-30 09:38 Abner3721 阅读(113) 评论(0) 推荐(0) 编辑
摘要: /** * 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 阅读(53) 评论(0) 推荐(0) 编辑
摘要: public function download($city){ if(!empty($city)){ $where = [ 'chengshi' => $city, 'mobile' => ['<>',''], ]; }else{ $where = [ 'mobile' => ['<>',''], 阅读全文
posted @ 2020-12-28 10:11 Abner3721 阅读(705) 评论(0) 推荐(0) 编辑
摘要: [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 阅读(358) 评论(0) 推荐(0) 编辑
摘要: <?php namespace app\index\controller; class Index { public function index(){ $this->excelout(); } /** * 百万级数据导出 */ public function excelout(){ //不限制执行 阅读全文
posted @ 2020-11-25 20:16 Abner3721 阅读(171) 评论(0) 推荐(0) 编辑
摘要: <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 阅读(71) 评论(0) 推荐(0) 编辑
摘要: # 准备 #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 阅读(482) 评论(0) 推荐(0) 编辑
摘要: <?php namespace app\common\fun; class HttpClient { /** * 发起请求 * @param string $url 请求地址 * @param string $param 请求数据包 * @return string 请求返回数据 */ public 阅读全文
posted @ 2020-11-12 15:40 Abner3721 阅读(90) 评论(0) 推荐(1) 编辑
摘要: /** * 数组转xls格式的excel文件 * @param array $data 需要生成excel文件的数组 * @param string $filename 生成的excel文件名 * 示例数据: $data = array( array(NULL, 2010, 2011, 2012), 阅读全文
posted @ 2020-10-27 19:54 Abner3721 阅读(198) 评论(0) 推荐(0) 编辑
摘要: <!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 阅读(50) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页