Download the PHP package myzero1/yii2-gridview-export without Composer
On this page you can find all versions of the php package myzero1/yii2-gridview-export. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download myzero1/yii2-gridview-export
More information about myzero1/yii2-gridview-export
Files in myzero1/yii2-gridview-export
Download myzero1/yii2-gridview-export
More information about myzero1/yii2-gridview-export
Files in myzero1/yii2-gridview-export
Vendor myzero1
Package yii2-gridview-export
Short Description The export module,export gridview data to excel.use the dataProvider and columns of the gridview.
License BSD-3-Clause
Package yii2-gridview-export
Short Description The export module,export gridview data to excel.use the dataProvider and columns of the gridview.
License BSD-3-Clause
Please rate this library. Is it a good library?
Informations about the package yii2-gridview-export
yii2-gridview-export
The export module,export gridview data to excel.use the dataProvider and columns of the gridview.
Show time
Installation
The preferred way to install this module is through composer.
Either run
or add
to the require section of your composer.json
file.
Setting
Once the extension is installed, simply modify your application configuration as follows:
in main.php
in params.php
Usage
Use export widget in view
You can use it,anywhere in view as following:
Use custom router
Use the custom router in ExportController.php, as following:
Use the custom router in view, as following:
Rebuild 2.0.0
导出方式 | 优点 | 缺点 | 保护 |
---|---|---|---|
文件(exportFile) | 可以压缩传输 | 反应慢(需要完全导出为文件后再下载) | 是要zip加密压缩 |
数据流(exportStream) | 反应快(边生成边下载) | 下载时间长不能压缩 | 使用web自动到的用户验证系统 |
myzero1_gdexport_streamMode 各个种参数解决yii2 AR recorder内存泄漏的优缺点
可选值 | 优点 | 缺点 | 注意 |
---|---|---|---|
gc | 使用gc_collect_cycles()回收内存,完全不影响现有逻辑 | 在某一些环境下gc_collect_cycles()不能回收内存,如php的一些docker环境,7.2-fpm-alpine,7.3-fpm-alpine ... | 默认值 |
rewrite_class | 重写vendor\yiisoft\yii2\base\Component.php,对业务处理逻辑没有影响 | 若在调用重写函数(rewriteClass2GC)之前已经使用了yii\base\Model或yii\db\Query 会导致重写失败,如\common\models\User::find() | 若默认参数不能解决问题建议使用这个参数 |
curl | 对原有代码没有任何侵入,通过curl分批次导出数据,每个curl请求完成自动回收内存,来达到防止内存泄漏的目的 | CPU消耗大,只有actionExportStream实现了这个功能 | cpu资源小的,不建议使用 |
*****注意
Composer中~和^的含义
release log
All versions of yii2-gridview-export with dependencies
PHP Build Version
Package Version
The package myzero1/yii2-gridview-export contains the following files
Loading the files please wait ....