【文件属性】:
文件名称:yii2-thecsv:yii2 csv导出扩展
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-22 14:51:44
PHP
yii2-thecsv
yii2 csv导出扩展
1.安装
运行php composer.phar require m35/thecsv 或者在您的composer.json文件中添加"m35/thecsv": "*" 。
2.用法
<?php
use m35\thecsv\theCsv;
theCsv:: export ( 'tableName' ); // return true if success
3.参数与示例
3.0参数
3.0.1字符串类型
您可以指定一个表名作为参数,它将导出表的所有数据并自动将表字段名生成为csv标头。
3.0.2数组类型
table :表格名称( string )
fields :要导出的表字段,如果不设置则将导出所有字段( array )
exceptFields :如果不设置,则在上面设置的表字段除外,默认为false( bool )
he
【文件预览】:
yii2-thecsv-master
----theCsv.php(4KB)
----README.md(9KB)
----composer.json(444B)