Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d12b41c0
authored
Apr 02, 2018
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
订单excel导出(暂存)
parent
1b04165b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
app/Http/Controllers/OrderController.php
app/Http/Function.php
app/Http/Controllers/OrderController.php
View file @
d12b41c0
This diff is collapsed.
Click to expand it.
app/Http/Function.php
View file @
d12b41c0
...
...
@@ -14,6 +14,14 @@
$objPHPExcel
=
new
PHPExcel
();
include_once
(
__DIR__
.
"/../../vendor/PHPExcel/PHPExcel/IOFactory.php"
);
set_time_limit
(
0
);
//不对php(主要是写数据)执行时间做限制
ini_set
(
"memory_limit"
,
"1024M"
);
//设置内存(防爆内存)
$cacheMethod
=
\PHPExcel_CachedObjectStorageFactory
::
cache_in_memory_serialized
;
//设置缓存策略(减少内存占用)
//判断缓存策略是否可用
if
(
!
\PHPExcel_Settings
::
setCacheStorageMethod
(
$cacheMethod
))
{
die
(
$cacheMethod
.
" 缓存方法不可用"
.
EOL
);
}
$cellName
=
array
(
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
,
'K'
,
'L'
,
'M'
,
'N'
,
'O'
,
'P'
,
'Q'
,
'R'
,
'S'
,
'T'
,
'U'
,
'V'
,
'W'
,
'X'
,
'Y'
,
'Z'
,
'AA'
,
'AB'
,
'AC'
,
'AD'
,
'AE'
,
'AF'
,
'AG'
,
'AH'
,
'AI'
,
'AJ'
,
'AK'
,
'AL'
,
'AM'
,
'AN'
,
'AO'
,
'AP'
,
'AQ'
,
'AR'
,
'AS'
,
'AT'
,
'AU'
,
'AV'
,
'AW'
,
'AX'
,
'AY'
,
'AZ'
);
//显示导出名称和导出时间
// $objPHPExcel->getActiveSheet(0)->mergeCells('A1:'.$cellName[$cellNum-1].'1');//合并单元格
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment